The check in if_ether.c for carp here does not make any sense.

There are two possible cases.
- parent interface without IP address
- parent interface with IP address

In the first case the carp mac-address will always be used. So no need to
do the check. In the 2nd case the parent interface mac-address will be
used and that is also always correct since we clone from there.
There is no way that the ifp and the rt->rt_ifp are not the same in this
case. So just remove this code and get rid of one rt_ifp.

-- 
:wq Claudio

Index: if_ether.c
===================================================================
RCS file: /cvs/src/sys/netinet/if_ether.c,v
retrieving revision 1.193
diff -u -p -r1.193 if_ether.c
--- if_ether.c  2 Dec 2015 13:29:26 -0000       1.193
+++ if_ether.c  2 Dec 2015 17:29:45 -0000
@@ -401,11 +401,6 @@ arpresolve(struct ifnet *ifp, struct rte
                                arprequest(ifp,
                                    
&satosin(rt->rt_ifa->ifa_addr)->sin_addr.s_addr,
                                    &satosin(dst)->sin_addr.s_addr,
-#if NCARP > 0
-                                   (rt->rt_ifp->if_type == IFT_CARP) ?
-                                       ((struct arpcom *) rt->rt_ifp->if_softc
-                                       )->ac_enaddr :
-#endif
                                    ac->ac_enaddr);
                        else {
                                rt->rt_flags |= RTF_REJECT;

Reply via email to