Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6.c
| Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | |||||||||
| #include <netinet6/nd6.h> | #include <netinet6/nd6.h> | ||||||||
| #include <netinet6/mld6_var.h> | #include <netinet6/mld6_var.h> | ||||||||
| #include <netinet6/ip6_mroute.h> | #include <netinet6/ip6_mroute.h> | ||||||||
| #include <netinet6/in6_ifattach.h> | #include <netinet6/in6_ifattach.h> | ||||||||
| #include <netinet6/scope6_var.h> | #include <netinet6/scope6_var.h> | ||||||||
| #include <netinet6/in6_fib.h> | #include <netinet6/in6_fib.h> | ||||||||
| #include <netinet6/in6_pcb.h> | #include <netinet6/in6_pcb.h> | ||||||||
| #ifdef MAC | |||||||||
| #include <security/mac/mac_framework.h> | |||||||||
| #endif | |||||||||
bz: Hide behind ifdef as well. | |||||||||
| /* | /* | ||||||||
| * struct in6_ifreq and struct ifreq must be type punnable for common members | * struct in6_ifreq and struct ifreq must be type punnable for common members | ||||||||
| * of ifr_ifru to allow accessors to be shared. | * of ifr_ifru to allow accessors to be shared. | ||||||||
| */ | */ | ||||||||
| _Static_assert(offsetof(struct in6_ifreq, ifr_ifru) == | _Static_assert(offsetof(struct in6_ifreq, ifr_ifru) == | ||||||||
| offsetof(struct ifreq, ifr_ifru), | offsetof(struct ifreq, ifr_ifru), | ||||||||
| "struct in6_ifreq and struct ifreq are not type punnable"); | "struct in6_ifreq and struct ifreq are not type punnable"); | ||||||||
| ▲ Show 20 Lines • Show All 427 Lines • ▼ Show 20 Lines | if (ia->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME) { | ||||||||
| retlt->ia6t_preferred = maxexpire; | retlt->ia6t_preferred = maxexpire; | ||||||||
| } | } | ||||||||
| break; | break; | ||||||||
| case SIOCAIFADDR_IN6: | case SIOCAIFADDR_IN6: | ||||||||
| { | { | ||||||||
| struct nd_prefixctl pr0; | struct nd_prefixctl pr0; | ||||||||
| struct nd_prefix *pr; | struct nd_prefix *pr; | ||||||||
Done Inline Actions
melifaro: | |||||||||
| #ifdef MAC | |||||||||
| /* Check if a MAC policy disallows setting the IPv6 address. */ | |||||||||
| error = mac_inet6_check_SIOCAIFADDR(td->td_ucred, | |||||||||
| &sa6->sin6_addr, ifp); | |||||||||
Done Inline ActionsMove into ifdef block, properly indent the * to be underneath each other. "." at the end. bz: Move into ifdef block, properly indent the * to be underneath each other. "." at the end. | |||||||||
| if (error) | |||||||||
| goto out; | |||||||||
| #endif | |||||||||
Done Inline ActionsAgain { } bz: Again { } | |||||||||
| /* | /* | ||||||||
| * first, make or update the interface address structure, | * first, make or update the interface address structure, | ||||||||
| * and link it to the list. | * and link it to the list. | ||||||||
| */ | */ | ||||||||
| if ((error = in6_update_ifa(ifp, ifra, ia, 0)) != 0) | if ((error = in6_update_ifa(ifp, ifra, ia, 0)) != 0) | ||||||||
| goto out; | goto out; | ||||||||
| if (ia != NULL) { | if (ia != NULL) { | ||||||||
| if (ia->ia_ifa.ifa_carp) | if (ia->ia_ifa.ifa_carp) | ||||||||
| ▲ Show 20 Lines • Show All 1,997 Lines • Show Last 20 Lines | |||||||||
Hide behind ifdef as well.