addrconf.c (61e18ce7348bfefb5688a8bcd4b4d6b37c0f9b2a) | addrconf.c (18ac597af25e9760b76471524096f5b29eb820e6) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * IPv6 Address [auto]configuration 4 * Linux INET6 implementation 5 * 6 * Authors: 7 * Pedro Roque <roque@di.fc.ul.pt> 8 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> --- 227 unchanged lines hidden (view full) --- 236#endif 237 .enhanced_dad = 1, 238 .addr_gen_mode = IN6_ADDR_GEN_MODE_EUI64, 239 .disable_policy = 0, 240 .rpl_seg_enabled = 0, 241 .ioam6_enabled = 0, 242 .ioam6_id = IOAM6_DEFAULT_IF_ID, 243 .ioam6_id_wide = IOAM6_DEFAULT_IF_ID_WIDE, | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * IPv6 Address [auto]configuration 4 * Linux INET6 implementation 5 * 6 * Authors: 7 * Pedro Roque <roque@di.fc.ul.pt> 8 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> --- 227 unchanged lines hidden (view full) --- 236#endif 237 .enhanced_dad = 1, 238 .addr_gen_mode = IN6_ADDR_GEN_MODE_EUI64, 239 .disable_policy = 0, 240 .rpl_seg_enabled = 0, 241 .ioam6_enabled = 0, 242 .ioam6_id = IOAM6_DEFAULT_IF_ID, 243 .ioam6_id_wide = IOAM6_DEFAULT_IF_ID_WIDE, |
244 .ndisc_evict_nocarrier = 1, |
|
244}; 245 246static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = { 247 .forwarding = 0, 248 .hop_limit = IPV6_DEFAULT_HOPLIMIT, 249 .mtu6 = IPV6_MIN_MTU, 250 .accept_ra = 1, 251 .accept_redirects = 1, --- 43 unchanged lines hidden (view full) --- 295#endif 296 .enhanced_dad = 1, 297 .addr_gen_mode = IN6_ADDR_GEN_MODE_EUI64, 298 .disable_policy = 0, 299 .rpl_seg_enabled = 0, 300 .ioam6_enabled = 0, 301 .ioam6_id = IOAM6_DEFAULT_IF_ID, 302 .ioam6_id_wide = IOAM6_DEFAULT_IF_ID_WIDE, | 245}; 246 247static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = { 248 .forwarding = 0, 249 .hop_limit = IPV6_DEFAULT_HOPLIMIT, 250 .mtu6 = IPV6_MIN_MTU, 251 .accept_ra = 1, 252 .accept_redirects = 1, --- 43 unchanged lines hidden (view full) --- 296#endif 297 .enhanced_dad = 1, 298 .addr_gen_mode = IN6_ADDR_GEN_MODE_EUI64, 299 .disable_policy = 0, 300 .rpl_seg_enabled = 0, 301 .ioam6_enabled = 0, 302 .ioam6_id = IOAM6_DEFAULT_IF_ID, 303 .ioam6_id_wide = IOAM6_DEFAULT_IF_ID_WIDE, |
304 .ndisc_evict_nocarrier = 1, |
|
303}; 304 305/* Check if link is ready: is it up and is a valid qdisc available */ 306static inline bool addrconf_link_ready(const struct net_device *dev) 307{ 308 return netif_oper_up(dev) && !qdisc_tx_is_noop(dev); 309} 310 --- 5229 unchanged lines hidden (view full) --- 5540 array[DEVCONF_ENHANCED_DAD] = cnf->enhanced_dad; 5541 array[DEVCONF_ADDR_GEN_MODE] = cnf->addr_gen_mode; 5542 array[DEVCONF_DISABLE_POLICY] = cnf->disable_policy; 5543 array[DEVCONF_NDISC_TCLASS] = cnf->ndisc_tclass; 5544 array[DEVCONF_RPL_SEG_ENABLED] = cnf->rpl_seg_enabled; 5545 array[DEVCONF_IOAM6_ENABLED] = cnf->ioam6_enabled; 5546 array[DEVCONF_IOAM6_ID] = cnf->ioam6_id; 5547 array[DEVCONF_IOAM6_ID_WIDE] = cnf->ioam6_id_wide; | 305}; 306 307/* Check if link is ready: is it up and is a valid qdisc available */ 308static inline bool addrconf_link_ready(const struct net_device *dev) 309{ 310 return netif_oper_up(dev) && !qdisc_tx_is_noop(dev); 311} 312 --- 5229 unchanged lines hidden (view full) --- 5542 array[DEVCONF_ENHANCED_DAD] = cnf->enhanced_dad; 5543 array[DEVCONF_ADDR_GEN_MODE] = cnf->addr_gen_mode; 5544 array[DEVCONF_DISABLE_POLICY] = cnf->disable_policy; 5545 array[DEVCONF_NDISC_TCLASS] = cnf->ndisc_tclass; 5546 array[DEVCONF_RPL_SEG_ENABLED] = cnf->rpl_seg_enabled; 5547 array[DEVCONF_IOAM6_ENABLED] = cnf->ioam6_enabled; 5548 array[DEVCONF_IOAM6_ID] = cnf->ioam6_id; 5549 array[DEVCONF_IOAM6_ID_WIDE] = cnf->ioam6_id_wide; |
5550 array[DEVCONF_NDISC_EVICT_NOCARRIER] = cnf->ndisc_evict_nocarrier; |
|
5548} 5549 5550static inline size_t inet6_ifla6_size(void) 5551{ 5552 return nla_total_size(4) /* IFLA_INET6_FLAGS */ 5553 + nla_total_size(sizeof(struct ifla_cacheinfo)) 5554 + nla_total_size(DEVCONF_MAX * 4) /* IFLA_INET6_CONF */ 5555 + nla_total_size(IPSTATS_MIB_MAX * 8) /* IFLA_INET6_STATS */ --- 1426 unchanged lines hidden (view full) --- 6982 { 6983 .procname = "ioam6_id_wide", 6984 .data = &ipv6_devconf.ioam6_id_wide, 6985 .maxlen = sizeof(u32), 6986 .mode = 0644, 6987 .proc_handler = proc_douintvec, 6988 }, 6989 { | 5551} 5552 5553static inline size_t inet6_ifla6_size(void) 5554{ 5555 return nla_total_size(4) /* IFLA_INET6_FLAGS */ 5556 + nla_total_size(sizeof(struct ifla_cacheinfo)) 5557 + nla_total_size(DEVCONF_MAX * 4) /* IFLA_INET6_CONF */ 5558 + nla_total_size(IPSTATS_MIB_MAX * 8) /* IFLA_INET6_STATS */ --- 1426 unchanged lines hidden (view full) --- 6985 { 6986 .procname = "ioam6_id_wide", 6987 .data = &ipv6_devconf.ioam6_id_wide, 6988 .maxlen = sizeof(u32), 6989 .mode = 0644, 6990 .proc_handler = proc_douintvec, 6991 }, 6992 { |
6993 .procname = "ndisc_evict_nocarrier", 6994 .data = &ipv6_devconf.ndisc_evict_nocarrier, 6995 .maxlen = sizeof(u8), 6996 .mode = 0644, 6997 .proc_handler = proc_dou8vec_minmax, 6998 .extra1 = (void *)SYSCTL_ZERO, 6999 .extra2 = (void *)SYSCTL_ONE, 7000 }, 7001 { |
|
6990 /* sentinel */ 6991 } 6992}; 6993 6994static int __addrconf_sysctl_register(struct net *net, char *dev_name, 6995 struct inet6_dev *idev, struct ipv6_devconf *p) 6996{ 6997 int i, ifindex; --- 327 unchanged lines hidden --- | 7002 /* sentinel */ 7003 } 7004}; 7005 7006static int __addrconf_sysctl_register(struct net *net, char *dev_name, 7007 struct inet6_dev *idev, struct ipv6_devconf *p) 7008{ 7009 int i, ifindex; --- 327 unchanged lines hidden --- |