addrlabel.c (efd7ef1c1929d7a0329d4349252863c04d6f1729) | addrlabel.c (0c5c9fb55106333e773de8c9dd321fa8240caeb3) |
---|---|
1/* 2 * IPv6 Address Label subsystem 3 * for the IPv6 "Default" Source Address Selection 4 * 5 * Copyright (C)2007 USAGI/WIDE Project 6 */ 7/* 8 * Author: --- 15 unchanged lines hidden (view full) --- 24#else 25#define ADDRLABEL(x...) do { ; } while (0) 26#endif 27 28/* 29 * Policy Table 30 */ 31struct ip6addrlbl_entry { | 1/* 2 * IPv6 Address Label subsystem 3 * for the IPv6 "Default" Source Address Selection 4 * 5 * Copyright (C)2007 USAGI/WIDE Project 6 */ 7/* 8 * Author: --- 15 unchanged lines hidden (view full) --- 24#else 25#define ADDRLABEL(x...) do { ; } while (0) 26#endif 27 28/* 29 * Policy Table 30 */ 31struct ip6addrlbl_entry { |
32#ifdef CONFIG_NET_NS 33 struct net *lbl_net; 34#endif | 32 possible_net_t lbl_net; |
35 struct in6_addr prefix; 36 int prefixlen; 37 int ifindex; 38 int addrtype; 39 u32 label; 40 struct hlist_node list; 41 atomic_t refcnt; 42 struct rcu_head rcu; --- 189 unchanged lines hidden (view full) --- 232 return ERR_PTR(-ENOMEM); 233 234 ipv6_addr_prefix(&newp->prefix, prefix, prefixlen); 235 newp->prefixlen = prefixlen; 236 newp->ifindex = ifindex; 237 newp->addrtype = addrtype; 238 newp->label = label; 239 INIT_HLIST_NODE(&newp->list); | 33 struct in6_addr prefix; 34 int prefixlen; 35 int ifindex; 36 int addrtype; 37 u32 label; 38 struct hlist_node list; 39 atomic_t refcnt; 40 struct rcu_head rcu; --- 189 unchanged lines hidden (view full) --- 230 return ERR_PTR(-ENOMEM); 231 232 ipv6_addr_prefix(&newp->prefix, prefix, prefixlen); 233 newp->prefixlen = prefixlen; 234 newp->ifindex = ifindex; 235 newp->addrtype = addrtype; 236 newp->label = label; 237 INIT_HLIST_NODE(&newp->list); |
240#ifdef CONFIG_NET_NS 241 newp->lbl_net = net; 242#endif | 238 write_pnet(&newp->lbl_net, net); |
243 atomic_set(&newp->refcnt, 1); 244 return newp; 245} 246 247/* add a label */ 248static int __ip6addrlbl_add(struct ip6addrlbl_entry *newp, int replace) 249{ 250 struct hlist_node *n; --- 351 unchanged lines hidden --- | 239 atomic_set(&newp->refcnt, 1); 240 return newp; 241} 242 243/* add a label */ 244static int __ip6addrlbl_add(struct ip6addrlbl_entry *newp, int replace) 245{ 246 struct hlist_node *n; --- 351 unchanged lines hidden --- |