in.c (228454) | in.c (228571) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (C) 2001 WIDE Project. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * @(#)in.c 8.4 (Berkeley) 1/9/95 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (C) 2001 WIDE Project. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * @(#)in.c 8.4 (Berkeley) 1/9/95 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/netinet/in.c 228454 2011-12-13 06:56:43Z glebius $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/in.c 228571 2011-12-16 12:16:56Z glebius $"); |
35 36#include "opt_mpath.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/sockio.h> 41#include <sys/malloc.h> 42#include <sys/priv.h> --- 8 unchanged lines hidden (view full) --- 51#include <net/if_var.h> 52#include <net/if_arp.h> 53#include <net/if_dl.h> 54#include <net/if_llatbl.h> 55#include <net/if_types.h> 56#include <net/route.h> 57#include <net/vnet.h> 58 | 35 36#include "opt_mpath.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/sockio.h> 41#include <sys/malloc.h> 42#include <sys/priv.h> --- 8 unchanged lines hidden (view full) --- 51#include <net/if_var.h> 52#include <net/if_arp.h> 53#include <net/if_dl.h> 54#include <net/if_llatbl.h> 55#include <net/if_types.h> 56#include <net/route.h> 57#include <net/vnet.h> 58 |
59#include <netinet/if_ether.h> |
|
59#include <netinet/in.h> 60#include <netinet/in_var.h> 61#include <netinet/in_pcb.h> 62#include <netinet/ip_var.h> | 60#include <netinet/in.h> 61#include <netinet/in_var.h> 62#include <netinet/in_pcb.h> 63#include <netinet/ip_var.h> |
64#include <netinet/ip_carp.h> |
|
63#include <netinet/igmp_var.h> 64#include <netinet/udp.h> 65#include <netinet/udp_var.h> 66 67static int in_mask2len(struct in_addr *); 68static void in_len2mask(struct in_addr *, int); 69static int in_lifaddr_ioctl(struct socket *, u_long, caddr_t, 70 struct ifnet *, struct thread *); 71 | 65#include <netinet/igmp_var.h> 66#include <netinet/udp.h> 67#include <netinet/udp_var.h> 68 69static int in_mask2len(struct in_addr *); 70static void in_len2mask(struct in_addr *, int); 71static int in_lifaddr_ioctl(struct socket *, u_long, caddr_t, 72 struct ifnet *, struct thread *); 73 |
72static int in_addprefix(struct in_ifaddr *, int); 73static int in_scrubprefix(struct in_ifaddr *, u_int); | |
74static void in_socktrim(struct sockaddr_in *); | 74static void in_socktrim(struct sockaddr_in *); |
75static int in_ifinit(struct ifnet *, 76 struct in_ifaddr *, struct sockaddr_in *, int, int); | 75static int in_ifinit(struct ifnet *, struct in_ifaddr *, 76 struct sockaddr_in *, int, int, int); |
77static void in_purgemaddrs(struct ifnet *); 78 | 77static void in_purgemaddrs(struct ifnet *); 78 |
79static VNET_DEFINE(int, sameprefixcarponly); 80#define V_sameprefixcarponly VNET(sameprefixcarponly) 81SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, 82 &VNET_NAME(sameprefixcarponly), 0, | 79static VNET_DEFINE(int, nosameprefix); 80#define V_nosameprefix VNET(nosameprefix) 81SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, no_same_prefix, CTLFLAG_RW, 82 &VNET_NAME(nosameprefix), 0, |
83 "Refuse to create same prefixes on different interfaces"); 84 85VNET_DECLARE(struct inpcbinfo, ripcbinfo); 86#define V_ripcbinfo VNET(ripcbinfo) 87 88VNET_DECLARE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ 89#define V_arpstat VNET(arpstat) 90 --- 421 unchanged lines hidden (view full) --- 512 error = EINVAL; 513 goto out; 514 } 515 ia->ia_broadaddr = *(struct sockaddr_in *)&ifr->ifr_broadaddr; 516 goto out; 517 518 case SIOCSIFADDR: 519 error = in_ifinit(ifp, ia, | 83 "Refuse to create same prefixes on different interfaces"); 84 85VNET_DECLARE(struct inpcbinfo, ripcbinfo); 86#define V_ripcbinfo VNET(ripcbinfo) 87 88VNET_DECLARE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ 89#define V_arpstat VNET(arpstat) 90 --- 421 unchanged lines hidden (view full) --- 512 error = EINVAL; 513 goto out; 514 } 515 ia->ia_broadaddr = *(struct sockaddr_in *)&ifr->ifr_broadaddr; 516 goto out; 517 518 case SIOCSIFADDR: 519 error = in_ifinit(ifp, ia, |
520 (struct sockaddr_in *) &ifr->ifr_addr, 1, 0); | 520 (struct sockaddr_in *) &ifr->ifr_addr, 1, 0, 0); |
521 if (error != 0 && iaIsNew) 522 break; 523 if (error == 0) { 524 ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); 525 if (iaIsFirst && 526 (ifp->if_flags & IFF_MULTICAST) != 0) { 527 error = in_joingroup(ifp, &allhosts_addr, 528 NULL, &ii->ii_allhosts); --- 36 unchanged lines hidden (view full) --- 565 if ((ifp->if_flags & IFF_POINTOPOINT) && 566 (ifra->ifra_dstaddr.sin_family == AF_INET)) { 567 in_ifscrub(ifp, ia, LLE_STATIC); 568 ia->ia_dstaddr = ifra->ifra_dstaddr; 569 maskIsNew = 1; /* We lie; but the effect's the same */ 570 } 571 if (hostIsNew || maskIsNew) 572 error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0, | 521 if (error != 0 && iaIsNew) 522 break; 523 if (error == 0) { 524 ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); 525 if (iaIsFirst && 526 (ifp->if_flags & IFF_MULTICAST) != 0) { 527 error = in_joingroup(ifp, &allhosts_addr, 528 NULL, &ii->ii_allhosts); --- 36 unchanged lines hidden (view full) --- 565 if ((ifp->if_flags & IFF_POINTOPOINT) && 566 (ifra->ifra_dstaddr.sin_family == AF_INET)) { 567 in_ifscrub(ifp, ia, LLE_STATIC); 568 ia->ia_dstaddr = ifra->ifra_dstaddr; 569 maskIsNew = 1; /* We lie; but the effect's the same */ 570 } 571 if (hostIsNew || maskIsNew) 572 error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0, |
573 maskIsNew); | 573 maskIsNew, ifra->ifra_vhid); |
574 if (error != 0 && iaIsNew) 575 break; 576 577 if ((ifp->if_flags & IFF_BROADCAST) && 578 ifra->ifra_broadaddr.sin_len) 579 ia->ia_broadaddr = ifra->ifra_broadaddr; 580 if (error == 0) { 581 ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); --- 22 unchanged lines hidden (view full) --- 604 EVENTHANDLER_INVOKE(ifaddr_event, ifp); 605 error = 0; 606 break; 607 608 default: 609 panic("in_control: unsupported ioctl"); 610 } 611 | 574 if (error != 0 && iaIsNew) 575 break; 576 577 if ((ifp->if_flags & IFF_BROADCAST) && 578 ifra->ifra_broadaddr.sin_len) 579 ia->ia_broadaddr = ifra->ifra_broadaddr; 580 if (error == 0) { 581 ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); --- 22 unchanged lines hidden (view full) --- 604 EVENTHANDLER_INVOKE(ifaddr_event, ifp); 605 error = 0; 606 break; 607 608 default: 609 panic("in_control: unsupported ioctl"); 610 } 611 |
612 if (ia->ia_ifa.ifa_carp) 613 (*carp_detach_p)(&ia->ia_ifa); 614 |
|
612 IF_ADDR_LOCK(ifp); 613 /* Re-check that ia is still part of the list. */ 614 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { 615 if (ifa == &ia->ia_ifa) 616 break; 617 } 618 if (ifa == NULL) { 619 /* --- 218 unchanged lines hidden (view full) --- 838} 839 840/* 841 * Initialize an interface's internet address 842 * and routing table entry. 843 */ 844static int 845in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin, | 615 IF_ADDR_LOCK(ifp); 616 /* Re-check that ia is still part of the list. */ 617 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { 618 if (ifa == &ia->ia_ifa) 619 break; 620 } 621 if (ifa == NULL) { 622 /* --- 218 unchanged lines hidden (view full) --- 841} 842 843/* 844 * Initialize an interface's internet address 845 * and routing table entry. 846 */ 847static int 848in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin, |
846 int scrub, int masksupplied) | 849 int scrub, int masksupplied, int vhid) |
847{ 848 register u_long i = ntohl(sin->sin_addr.s_addr); 849 int flags = RTF_UP, error = 0; 850 851 if (scrub) 852 in_scrubprefix(ia, LLE_STATIC); 853 854 IN_IFADDR_WLOCK(); 855 if (ia->ia_addr.sin_family == AF_INET) 856 LIST_REMOVE(ia, ia_hash); 857 ia->ia_addr = *sin; 858 LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr), 859 ia, ia_hash); 860 IN_IFADDR_WUNLOCK(); 861 | 850{ 851 register u_long i = ntohl(sin->sin_addr.s_addr); 852 int flags = RTF_UP, error = 0; 853 854 if (scrub) 855 in_scrubprefix(ia, LLE_STATIC); 856 857 IN_IFADDR_WLOCK(); 858 if (ia->ia_addr.sin_family == AF_INET) 859 LIST_REMOVE(ia, ia_hash); 860 ia->ia_addr = *sin; 861 LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr), 862 ia, ia_hash); 863 IN_IFADDR_WUNLOCK(); 864 |
865 if (vhid > 0) { 866 if (carp_attach_p != NULL) 867 error = (*carp_attach_p)(&ia->ia_ifa, vhid); 868 else 869 error = EPROTONOSUPPORT; 870 } 871 if (error) 872 return (error); 873 |
|
862 /* 863 * Give the interface a chance to initialize 864 * if this is its first address, 865 * and to validate the address if necessary. 866 */ 867 if (ifp->if_ioctl != NULL && 868 (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia)) != 0) 869 /* LIST_REMOVE(ia, ia_hash) is done in in_control */ --- 10 unchanged lines hidden (view full) --- 880 ia->ia_subnetmask = IN_CLASSB_NET; 881 else 882 ia->ia_subnetmask = IN_CLASSC_NET; 883 ia->ia_sockmask.sin_addr.s_addr = htonl(ia->ia_subnetmask); 884 } 885 ia->ia_subnet = i & ia->ia_subnetmask; 886 in_socktrim(&ia->ia_sockmask); 887 /* | 874 /* 875 * Give the interface a chance to initialize 876 * if this is its first address, 877 * and to validate the address if necessary. 878 */ 879 if (ifp->if_ioctl != NULL && 880 (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia)) != 0) 881 /* LIST_REMOVE(ia, ia_hash) is done in in_control */ --- 10 unchanged lines hidden (view full) --- 892 ia->ia_subnetmask = IN_CLASSB_NET; 893 else 894 ia->ia_subnetmask = IN_CLASSC_NET; 895 ia->ia_sockmask.sin_addr.s_addr = htonl(ia->ia_subnetmask); 896 } 897 ia->ia_subnet = i & ia->ia_subnetmask; 898 in_socktrim(&ia->ia_sockmask); 899 /* |
888 * XXX: carp(4) does not have interface route 889 */ 890 if (ifp->if_type == IFT_CARP) 891 return (0); 892 /* | |
893 * Add route for the network. 894 */ 895 ia->ia_ifa.ifa_metric = ifp->if_metric; 896 if (ifp->if_flags & IFF_BROADCAST) { 897 if (ia->ia_subnetmask == IN_RFC3021_MASK) 898 ia->ia_broadaddr.sin_addr.s_addr = INADDR_BROADCAST; 899 else 900 ia->ia_broadaddr.sin_addr.s_addr = 901 htonl(ia->ia_subnet | ~ia->ia_subnetmask); 902 } else if (ifp->if_flags & IFF_LOOPBACK) { 903 ia->ia_dstaddr = ia->ia_addr; 904 flags |= RTF_HOST; 905 } else if (ifp->if_flags & IFF_POINTOPOINT) { 906 if (ia->ia_dstaddr.sin_family != AF_INET) 907 return (0); 908 flags |= RTF_HOST; 909 } | 900 * Add route for the network. 901 */ 902 ia->ia_ifa.ifa_metric = ifp->if_metric; 903 if (ifp->if_flags & IFF_BROADCAST) { 904 if (ia->ia_subnetmask == IN_RFC3021_MASK) 905 ia->ia_broadaddr.sin_addr.s_addr = INADDR_BROADCAST; 906 else 907 ia->ia_broadaddr.sin_addr.s_addr = 908 htonl(ia->ia_subnet | ~ia->ia_subnetmask); 909 } else if (ifp->if_flags & IFF_LOOPBACK) { 910 ia->ia_dstaddr = ia->ia_addr; 911 flags |= RTF_HOST; 912 } else if (ifp->if_flags & IFF_POINTOPOINT) { 913 if (ia->ia_dstaddr.sin_family != AF_INET) 914 return (0); 915 flags |= RTF_HOST; 916 } |
910 if ((error = in_addprefix(ia, flags)) != 0) | 917 if (!vhid && (error = in_addprefix(ia, flags)) != 0) |
911 return (error); 912 913 if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY) 914 return (0); 915 916 if (ifp->if_flags & IFF_POINTOPOINT && 917 ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr) 918 return (0); 919 920 /* 921 * add a loopback route to self 922 */ | 918 return (error); 919 920 if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY) 921 return (0); 922 923 if (ifp->if_flags & IFF_POINTOPOINT && 924 ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr) 925 return (0); 926 927 /* 928 * add a loopback route to self 929 */ |
923 if (V_useloopback && !(ifp->if_flags & IFF_LOOPBACK)) { | 930 if (V_useloopback && !vhid && !(ifp->if_flags & IFF_LOOPBACK)) { |
924 struct route ia_ro; 925 926 bzero(&ia_ro, sizeof(ia_ro)); 927 *((struct sockaddr_in *)(&ia_ro.ro_dst)) = ia->ia_addr; 928 rtalloc_ign_fib(&ia_ro, 0, 0); 929 if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && 930 (ia_ro.ro_rt->rt_ifp == V_loif)) { 931 RT_LOCK(ia_ro.ro_rt); --- 55 unchanged lines hidden (view full) --- 987 RTFREE(pfx_ro.ro_rt); 988 } 989 return; 990} 991 992/* 993 * Check if we have a route for the given prefix already or add one accordingly. 994 */ | 931 struct route ia_ro; 932 933 bzero(&ia_ro, sizeof(ia_ro)); 934 *((struct sockaddr_in *)(&ia_ro.ro_dst)) = ia->ia_addr; 935 rtalloc_ign_fib(&ia_ro, 0, 0); 936 if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && 937 (ia_ro.ro_rt->rt_ifp == V_loif)) { 938 RT_LOCK(ia_ro.ro_rt); --- 55 unchanged lines hidden (view full) --- 994 RTFREE(pfx_ro.ro_rt); 995 } 996 return; 997} 998 999/* 1000 * Check if we have a route for the given prefix already or add one accordingly. 1001 */ |
995static int | 1002int |
996in_addprefix(struct in_ifaddr *target, int flags) 997{ 998 struct in_ifaddr *ia; 999 struct in_addr prefix, mask, p, m; 1000 int error; 1001 1002 if ((flags & RTF_HOST) != 0) { 1003 prefix = target->ia_dstaddr.sin_addr; --- 29 unchanged lines hidden (view full) --- 1033#ifdef RADIX_MPATH 1034 if (ia->ia_addr.sin_addr.s_addr == 1035 target->ia_addr.sin_addr.s_addr) { 1036 IN_IFADDR_RUNLOCK(); 1037 return (EEXIST); 1038 } else 1039 break; 1040#endif | 1003in_addprefix(struct in_ifaddr *target, int flags) 1004{ 1005 struct in_ifaddr *ia; 1006 struct in_addr prefix, mask, p, m; 1007 int error; 1008 1009 if ((flags & RTF_HOST) != 0) { 1010 prefix = target->ia_dstaddr.sin_addr; --- 29 unchanged lines hidden (view full) --- 1040#ifdef RADIX_MPATH 1041 if (ia->ia_addr.sin_addr.s_addr == 1042 target->ia_addr.sin_addr.s_addr) { 1043 IN_IFADDR_RUNLOCK(); 1044 return (EEXIST); 1045 } else 1046 break; 1047#endif |
1041 if (V_sameprefixcarponly && 1042 target->ia_ifp->if_type != IFT_CARP && 1043 ia->ia_ifp->if_type != IFT_CARP) { | 1048 if (V_nosameprefix) { |
1044 IN_IFADDR_RUNLOCK(); 1045 return (EEXIST); 1046 } else { 1047 in_addralias_rtmsg(RTM_ADD, &prefix, target); 1048 IN_IFADDR_RUNLOCK(); 1049 return (0); 1050 } 1051 } --- 4 unchanged lines hidden (view full) --- 1056 * No-one seem to have this prefix route, so we try to insert it. 1057 */ 1058 error = rtinit(&target->ia_ifa, (int)RTM_ADD, flags); 1059 if (!error) 1060 target->ia_flags |= IFA_ROUTE; 1061 return (error); 1062} 1063 | 1049 IN_IFADDR_RUNLOCK(); 1050 return (EEXIST); 1051 } else { 1052 in_addralias_rtmsg(RTM_ADD, &prefix, target); 1053 IN_IFADDR_RUNLOCK(); 1054 return (0); 1055 } 1056 } --- 4 unchanged lines hidden (view full) --- 1061 * No-one seem to have this prefix route, so we try to insert it. 1062 */ 1063 error = rtinit(&target->ia_ifa, (int)RTM_ADD, flags); 1064 if (!error) 1065 target->ia_flags |= IFA_ROUTE; 1066 return (error); 1067} 1068 |
1064extern void arp_ifscrub(struct ifnet *ifp, uint32_t addr); 1065 | |
1066/* 1067 * If there is no other address in the system that can serve a route to the 1068 * same prefix, remove the route. Hand over the route to the new address 1069 * otherwise. 1070 */ | 1069/* 1070 * If there is no other address in the system that can serve a route to the 1071 * same prefix, remove the route. Hand over the route to the new address 1072 * otherwise. 1073 */ |
1071static int | 1074int |
1072in_scrubprefix(struct in_ifaddr *target, u_int flags) 1073{ 1074 struct in_ifaddr *ia; 1075 struct in_addr prefix, mask, p, m; 1076 int error = 0; 1077 struct sockaddr_in prefix0, mask0; 1078 1079 /* --- 71 unchanged lines hidden (view full) --- 1151 1152 if ((ia->ia_ifp->if_flags & IFF_UP) == 0) 1153 continue; 1154 1155 /* 1156 * If we got a matching prefix address, move IFA_ROUTE and 1157 * the route itself to it. Make sure that routing daemons 1158 * get a heads-up. | 1075in_scrubprefix(struct in_ifaddr *target, u_int flags) 1076{ 1077 struct in_ifaddr *ia; 1078 struct in_addr prefix, mask, p, m; 1079 int error = 0; 1080 struct sockaddr_in prefix0, mask0; 1081 1082 /* --- 71 unchanged lines hidden (view full) --- 1154 1155 if ((ia->ia_ifp->if_flags & IFF_UP) == 0) 1156 continue; 1157 1158 /* 1159 * If we got a matching prefix address, move IFA_ROUTE and 1160 * the route itself to it. Make sure that routing daemons 1161 * get a heads-up. |
1159 * 1160 * XXX: a special case for carp(4) interface - this should 1161 * be more generally specified as an interface that 1162 * doesn't support such action. | |
1163 */ | 1162 */ |
1164 if ((ia->ia_flags & IFA_ROUTE) == 0 1165 && (ia->ia_ifp->if_type != IFT_CARP)) { | 1163 if ((ia->ia_flags & IFA_ROUTE) == 0) { |
1166 ifa_ref(&ia->ia_ifa); 1167 IN_IFADDR_RUNLOCK(); 1168 error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, 1169 rtinitflags(target)); 1170 if (error == 0) 1171 target->ia_flags &= ~IFA_ROUTE; 1172 else 1173 log(LOG_INFO, "in_scrubprefix: err=%d, old prefix delete failed\n", --- 131 unchanged lines hidden (view full) --- 1305 LIST_REMOVE(inm, inm_link); 1306 inm_release_locked(inm); 1307 } 1308 igmp_ifdetach(ifp); 1309 1310 IN_MULTI_UNLOCK(); 1311} 1312 | 1164 ifa_ref(&ia->ia_ifa); 1165 IN_IFADDR_RUNLOCK(); 1166 error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, 1167 rtinitflags(target)); 1168 if (error == 0) 1169 target->ia_flags &= ~IFA_ROUTE; 1170 else 1171 log(LOG_INFO, "in_scrubprefix: err=%d, old prefix delete failed\n", --- 131 unchanged lines hidden (view full) --- 1303 LIST_REMOVE(inm, inm_link); 1304 inm_release_locked(inm); 1305 } 1306 igmp_ifdetach(ifp); 1307 1308 IN_MULTI_UNLOCK(); 1309} 1310 |
1313#include <net/if_dl.h> 1314#include <netinet/if_ether.h> 1315 | |
1316struct in_llentry { 1317 struct llentry base; 1318 struct sockaddr_in l3_addr4; 1319}; 1320 1321static struct llentry * 1322in_lltable_new(const struct sockaddr *l3addr, u_int flags) 1323{ --- 335 unchanged lines hidden --- | 1311struct in_llentry { 1312 struct llentry base; 1313 struct sockaddr_in l3_addr4; 1314}; 1315 1316static struct llentry * 1317in_lltable_new(const struct sockaddr *l3addr, u_int flags) 1318{ --- 335 unchanged lines hidden --- |