summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/icmp6.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-07-29 18:09:46 +0000
committerrwatson <rwatson@FreeBSD.org>2008-07-29 18:09:46 +0000
commitcd641465efc39b57509f1b8804848c55ba1b4738 (patch)
tree371d8edef6b300b98f1fc80a5d8bcb8ff8fd6879 /sys/netinet6/icmp6.c
parent1021fb07ded976dc03c797ff87f9dc69a52cb7f8 (diff)
downloadFreeBSD-src-cd641465efc39b57509f1b8804848c55ba1b4738.zip
FreeBSD-src-cd641465efc39b57509f1b8804848c55ba1b4738.tar.gz
Since we fail IPv6 raw socket allocation if inp->in6p_icmp6filt can't
be allocated, there's no need to conditionize use and freeing of it later. MFC after: 1 week
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r--sys/netinet6/icmp6.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index d71be64..3fdff60 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1908,9 +1908,8 @@ icmp6_rip6_input(struct mbuf **mp, int off)
!IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src))
continue;
INP_RLOCK(in6p);
- if (in6p->in6p_icmp6filt
- && ICMP6_FILTER_WILLBLOCK(icmp6->icmp6_type,
- in6p->in6p_icmp6filt)) {
+ if (ICMP6_FILTER_WILLBLOCK(icmp6->icmp6_type,
+ in6p->in6p_icmp6filt)) {
INP_RUNLOCK(in6p);
continue;
}
@@ -2722,10 +2721,6 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt)
error = EMSGSIZE;
break;
}
- if (inp->in6p_icmp6filt == NULL) {
- error = EINVAL;
- break;
- }
error = sooptcopyin(sopt, inp->in6p_icmp6filt, optlen,
optlen);
break;
@@ -2741,10 +2736,6 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt)
switch (optname) {
case ICMP6_FILTER:
{
- if (inp->in6p_icmp6filt == NULL) {
- error = EINVAL;
- break;
- }
error = sooptcopyout(sopt, inp->in6p_icmp6filt,
sizeof(struct icmp6_filter));
break;
OpenPOWER on IntegriCloud