On Mon, May 08, 2017 at 10:55:04AM +0200, Martin Pieuchot wrote:
> This diff removes a false positive from bluhm@'s lock analyser. This is
> the last piece to turn the NET_LOCK() on.
>
> pfctlinput(PRC_IFDOWN, ...) is a noop. None of the *_ctlinput() handler
> present in the kernel handle PRC_IFDOWN. And all of do nothing because
> inet{,6}ctlerrmap == 0.
>
> The two other chunks are for cleanup purposes.
>
> ok?
OK bluhm@
>
> Index: net/if.c
> ===================================================================
> RCS file: /cvs/src/sys/net/if.c,v
> retrieving revision 1.494
> diff -u -p -r1.494 if.c
> --- net/if.c 4 May 2017 15:00:24 -0000 1.494
> +++ net/if.c 8 May 2017 08:47:10 -0000
> @@ -1504,15 +1504,10 @@ if_downall(void)
> void
> if_down(struct ifnet *ifp)
> {
> - struct ifaddr *ifa;
> -
> splsoftassert(IPL_SOFTNET);
>
> ifp->if_flags &= ~IFF_UP;
> getmicrotime(&ifp->if_lastchange);
> - TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
> - pfctlinput(PRC_IFDOWN, ifa->ifa_addr);
> - }
> IFQ_PURGE(&ifp->if_snd);
>
> if_linkstate(ifp);
> Index: netinet6/ip6_output.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet6/ip6_output.c,v
> retrieving revision 1.228
> diff -u -p -r1.228 ip6_output.c
> --- netinet6/ip6_output.c 3 May 2017 08:35:55 -0000 1.228
> +++ netinet6/ip6_output.c 8 May 2017 08:46:28 -0000
> @@ -708,15 +708,6 @@ reroute:
> if (mtu > IPV6_MAXPACKET)
> mtu = IPV6_MAXPACKET;
>
> -#if 0
> - /* Notify a proper path MTU to applications. */
> - mtu32 = (u_int32_t)mtu;
> - bzero(&ip6cp, sizeof(ip6cp));
> - ip6cp.ip6c_cmdarg = (void *)&mtu32;
> - pfctlinput2(PRC_MSGSIZE, sin6tosa(&ro_pmtu->ro_dst),
> - (void *)&ip6cp);
> -#endif
> -
> /*
> * Change the next header field of the last header in the
> * unfragmentable part.
> Index: netinet6/nd6.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet6/nd6.c,v
> retrieving revision 1.207
> diff -u -p -r1.207 nd6.c
> --- netinet6/nd6.c 26 Mar 2017 08:49:22 -0000 1.207
> +++ netinet6/nd6.c 8 May 2017 08:46:21 -0000
> @@ -748,10 +748,6 @@ nd6_free(struct rtentry *rt, int gc)
>
> splsoftassert(IPL_SOFTNET);
>
> - /*
> - * we used to have pfctlinput(PRC_HOSTDEAD) here.
> - * even though it is not harmful, it was not really necessary.
> - */
> ifp = if_get(rt->rt_ifidx);
>
> if (!ip6_forwarding) {