summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet6/icmp6.c13
-rw-r--r--sys/netinet6/raw_ip6.c5
2 files changed, 3 insertions, 15 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;
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index a9f5bd2..4f02f32 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -592,10 +592,7 @@ rip6_detach(struct socket *so)
/* xxx: RSVP */
INP_INFO_WLOCK(&ripcbinfo);
INP_WLOCK(inp);
- if (inp->in6p_icmp6filt) {
- FREE(inp->in6p_icmp6filt, M_PCB);
- inp->in6p_icmp6filt = NULL;
- }
+ FREE(inp->in6p_icmp6filt, M_PCB);
in6_pcbdetach(inp);
in6_pcbfree(inp);
INP_INFO_WUNLOCK(&ripcbinfo);
OpenPOWER on IntegriCloud