diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/bridge/br_ioctl.c | 8 | ||||
| -rw-r--r-- | net/bridge/br_sysfs_br.c | 26 | ||||
| -rw-r--r-- | net/core/dev.c | 7 | ||||
| -rw-r--r-- | net/ipv4/inet_timewait_sock.c | 35 | ||||
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 1 | ||||
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 1 | ||||
| -rw-r--r-- | net/mac80211/mlme.c | 48 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_irc.c | 10 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_proto_gre.c | 14 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 6 | ||||
| -rw-r--r-- | net/tipc/bcast.c | 22 | ||||
| -rw-r--r-- | net/tipc/bcast.h | 22 | ||||
| -rw-r--r-- | net/tipc/bearer.c | 2 | ||||
| -rw-r--r-- | net/tipc/bearer.h | 2 | ||||
| -rw-r--r-- | net/tipc/cluster.c | 16 | ||||
| -rw-r--r-- | net/tipc/cluster.h | 10 | ||||
| -rw-r--r-- | net/tipc/discover.c | 2 | ||||
| -rw-r--r-- | net/tipc/link.c | 26 | ||||
| -rw-r--r-- | net/tipc/link.h | 2 | ||||
| -rw-r--r-- | net/tipc/name_table.h | 2 | ||||
| -rw-r--r-- | net/tipc/net.c | 2 | ||||
| -rw-r--r-- | net/tipc/net.h | 2 | ||||
| -rw-r--r-- | net/tipc/node.c | 60 | ||||
| -rw-r--r-- | net/tipc/node.h | 42 | ||||
| -rw-r--r-- | net/tipc/node_subscr.c | 4 | ||||
| -rw-r--r-- | net/tipc/node_subscr.h | 10 | ||||
| -rw-r--r-- | net/tipc/port.h | 2 | ||||
| -rw-r--r-- | net/tipc/zone.c | 4 | ||||
| -rw-r--r-- | net/tipc/zone.h | 2 |
29 files changed, 247 insertions, 143 deletions
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index eeee218eed80..5bbf07362172 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c | |||
| @@ -188,15 +188,21 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
| 188 | return 0; | 188 | return 0; |
| 189 | 189 | ||
| 190 | case BRCTL_SET_BRIDGE_HELLO_TIME: | 190 | case BRCTL_SET_BRIDGE_HELLO_TIME: |
| 191 | { | ||
| 192 | unsigned long t = clock_t_to_jiffies(args[1]); | ||
| 191 | if (!capable(CAP_NET_ADMIN)) | 193 | if (!capable(CAP_NET_ADMIN)) |
| 192 | return -EPERM; | 194 | return -EPERM; |
| 193 | 195 | ||
| 196 | if (t < HZ) | ||
| 197 | return -EINVAL; | ||
| 198 | |||
| 194 | spin_lock_bh(&br->lock); | 199 | spin_lock_bh(&br->lock); |
| 195 | br->bridge_hello_time = clock_t_to_jiffies(args[1]); | 200 | br->bridge_hello_time = t; |
| 196 | if (br_is_root_bridge(br)) | 201 | if (br_is_root_bridge(br)) |
| 197 | br->hello_time = br->bridge_hello_time; | 202 | br->hello_time = br->bridge_hello_time; |
| 198 | spin_unlock_bh(&br->lock); | 203 | spin_unlock_bh(&br->lock); |
| 199 | return 0; | 204 | return 0; |
| 205 | } | ||
| 200 | 206 | ||
| 201 | case BRCTL_SET_BRIDGE_MAX_AGE: | 207 | case BRCTL_SET_BRIDGE_MAX_AGE: |
| 202 | if (!capable(CAP_NET_ADMIN)) | 208 | if (!capable(CAP_NET_ADMIN)) |
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 27d6a511c8c1..158dee8b4965 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c | |||
| @@ -29,11 +29,12 @@ | |||
| 29 | */ | 29 | */ |
| 30 | static ssize_t store_bridge_parm(struct device *d, | 30 | static ssize_t store_bridge_parm(struct device *d, |
| 31 | const char *buf, size_t len, | 31 | const char *buf, size_t len, |
| 32 | void (*set)(struct net_bridge *, unsigned long)) | 32 | int (*set)(struct net_bridge *, unsigned long)) |
| 33 | { | 33 | { |
| 34 | struct net_bridge *br = to_bridge(d); | 34 | struct net_bridge *br = to_bridge(d); |
| 35 | char *endp; | 35 | char *endp; |
| 36 | unsigned long val; | 36 | unsigned long val; |
| 37 | int err; | ||
| 37 | 38 | ||
| 38 | if (!capable(CAP_NET_ADMIN)) | 39 | if (!capable(CAP_NET_ADMIN)) |
| 39 | return -EPERM; | 40 | return -EPERM; |
| @@ -43,9 +44,9 @@ static ssize_t store_bridge_parm(struct device *d, | |||
| 43 | return -EINVAL; | 44 | return -EINVAL; |
| 44 | 45 | ||
| 45 | spin_lock_bh(&br->lock); | 46 | spin_lock_bh(&br->lock); |
| 46 | (*set)(br, val); | 47 | err = (*set)(br, val); |
| 47 | spin_unlock_bh(&br->lock); | 48 | spin_unlock_bh(&br->lock); |
| 48 | return len; | 49 | return err ? err : len; |
| 49 | } | 50 | } |
| 50 | 51 | ||
| 51 | 52 | ||
| @@ -56,12 +57,13 @@ static ssize_t show_forward_delay(struct device *d, | |||
| 56 | return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); | 57 | return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); |
| 57 | } | 58 | } |
| 58 | 59 | ||
| 59 | static void set_forward_delay(struct net_bridge *br, unsigned long val) | 60 | static int set_forward_delay(struct net_bridge *br, unsigned long val) |
| 60 | { | 61 | { |
| 61 | unsigned long delay = clock_t_to_jiffies(val); | 62 | unsigned long delay = clock_t_to_jiffies(val); |
| 62 | br->forward_delay = delay; | 63 | br->forward_delay = delay; |
| 63 | if (br_is_root_bridge(br)) | 64 | if (br_is_root_bridge(br)) |
| 64 | br->bridge_forward_delay = delay; | 65 | br->bridge_forward_delay = delay; |
| 66 | return 0; | ||
| 65 | } | 67 | } |
| 66 | 68 | ||
| 67 | static ssize_t store_forward_delay(struct device *d, | 69 | static ssize_t store_forward_delay(struct device *d, |
| @@ -80,12 +82,17 @@ static ssize_t show_hello_time(struct device *d, struct device_attribute *attr, | |||
| 80 | jiffies_to_clock_t(to_bridge(d)->hello_time)); | 82 | jiffies_to_clock_t(to_bridge(d)->hello_time)); |
| 81 | } | 83 | } |
| 82 | 84 | ||
| 83 | static void set_hello_time(struct net_bridge *br, unsigned long val) | 85 | static int set_hello_time(struct net_bridge *br, unsigned long val) |
| 84 | { | 86 | { |
| 85 | unsigned long t = clock_t_to_jiffies(val); | 87 | unsigned long t = clock_t_to_jiffies(val); |
| 88 | |||
| 89 | if (t < HZ) | ||
| 90 | return -EINVAL; | ||
| 91 | |||
| 86 | br->hello_time = t; | 92 | br->hello_time = t; |
| 87 | if (br_is_root_bridge(br)) | 93 | if (br_is_root_bridge(br)) |
| 88 | br->bridge_hello_time = t; | 94 | br->bridge_hello_time = t; |
| 95 | return 0; | ||
| 89 | } | 96 | } |
| 90 | 97 | ||
| 91 | static ssize_t store_hello_time(struct device *d, | 98 | static ssize_t store_hello_time(struct device *d, |
| @@ -104,12 +111,13 @@ static ssize_t show_max_age(struct device *d, struct device_attribute *attr, | |||
| 104 | jiffies_to_clock_t(to_bridge(d)->max_age)); | 111 | jiffies_to_clock_t(to_bridge(d)->max_age)); |
| 105 | } | 112 | } |
| 106 | 113 | ||
| 107 | static void set_max_age(struct net_bridge *br, unsigned long val) | 114 | static int set_max_age(struct net_bridge *br, unsigned long val) |
| 108 | { | 115 | { |
| 109 | unsigned long t = clock_t_to_jiffies(val); | 116 | unsigned long t = clock_t_to_jiffies(val); |
| 110 | br->max_age = t; | 117 | br->max_age = t; |
| 111 | if (br_is_root_bridge(br)) | 118 | if (br_is_root_bridge(br)) |
| 112 | br->bridge_max_age = t; | 119 | br->bridge_max_age = t; |
| 120 | return 0; | ||
| 113 | } | 121 | } |
| 114 | 122 | ||
| 115 | static ssize_t store_max_age(struct device *d, struct device_attribute *attr, | 123 | static ssize_t store_max_age(struct device *d, struct device_attribute *attr, |
| @@ -126,9 +134,10 @@ static ssize_t show_ageing_time(struct device *d, | |||
| 126 | return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time)); | 134 | return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time)); |
| 127 | } | 135 | } |
| 128 | 136 | ||
| 129 | static void set_ageing_time(struct net_bridge *br, unsigned long val) | 137 | static int set_ageing_time(struct net_bridge *br, unsigned long val) |
| 130 | { | 138 | { |
| 131 | br->ageing_time = clock_t_to_jiffies(val); | 139 | br->ageing_time = clock_t_to_jiffies(val); |
| 140 | return 0; | ||
| 132 | } | 141 | } |
| 133 | 142 | ||
| 134 | static ssize_t store_ageing_time(struct device *d, | 143 | static ssize_t store_ageing_time(struct device *d, |
| @@ -180,9 +189,10 @@ static ssize_t show_priority(struct device *d, struct device_attribute *attr, | |||
| 180 | (br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]); | 189 | (br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]); |
| 181 | } | 190 | } |
| 182 | 191 | ||
| 183 | static void set_priority(struct net_bridge *br, unsigned long val) | 192 | static int set_priority(struct net_bridge *br, unsigned long val) |
| 184 | { | 193 | { |
| 185 | br_stp_set_bridge_priority(br, (u16) val); | 194 | br_stp_set_bridge_priority(br, (u16) val); |
| 195 | return 0; | ||
| 186 | } | 196 | } |
| 187 | 197 | ||
| 188 | static ssize_t store_priority(struct device *d, struct device_attribute *attr, | 198 | static ssize_t store_priority(struct device *d, struct device_attribute *attr, |
diff --git a/net/core/dev.c b/net/core/dev.c index 60c51f765887..e719ed29310f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -1991,8 +1991,13 @@ static void net_tx_action(struct softirq_action *h) | |||
| 1991 | spin_unlock(root_lock); | 1991 | spin_unlock(root_lock); |
| 1992 | } else { | 1992 | } else { |
| 1993 | if (!test_bit(__QDISC_STATE_DEACTIVATED, | 1993 | if (!test_bit(__QDISC_STATE_DEACTIVATED, |
| 1994 | &q->state)) | 1994 | &q->state)) { |
| 1995 | __netif_reschedule(q); | 1995 | __netif_reschedule(q); |
| 1996 | } else { | ||
| 1997 | smp_mb__before_clear_bit(); | ||
| 1998 | clear_bit(__QDISC_STATE_SCHED, | ||
| 1999 | &q->state); | ||
| 2000 | } | ||
| 1996 | } | 2001 | } |
| 1997 | } | 2002 | } |
| 1998 | } | 2003 | } |
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index d985bd613d25..743f011b9a84 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
| @@ -409,3 +409,38 @@ out: | |||
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | EXPORT_SYMBOL_GPL(inet_twdr_twcal_tick); | 411 | EXPORT_SYMBOL_GPL(inet_twdr_twcal_tick); |
| 412 | |||
| 413 | void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo, | ||
| 414 | struct inet_timewait_death_row *twdr, int family) | ||
| 415 | { | ||
| 416 | struct inet_timewait_sock *tw; | ||
| 417 | struct sock *sk; | ||
| 418 | struct hlist_node *node; | ||
| 419 | int h; | ||
| 420 | |||
| 421 | local_bh_disable(); | ||
| 422 | for (h = 0; h < (hashinfo->ehash_size); h++) { | ||
| 423 | struct inet_ehash_bucket *head = | ||
| 424 | inet_ehash_bucket(hashinfo, h); | ||
| 425 | rwlock_t *lock = inet_ehash_lockp(hashinfo, h); | ||
| 426 | restart: | ||
| 427 | write_lock(lock); | ||
| 428 | sk_for_each(sk, node, &head->twchain) { | ||
| 429 | |||
| 430 | tw = inet_twsk(sk); | ||
| 431 | if (!net_eq(twsk_net(tw), net) || | ||
| 432 | tw->tw_family != family) | ||
| 433 | continue; | ||
| 434 | |||
| 435 | atomic_inc(&tw->tw_refcnt); | ||
| 436 | write_unlock(lock); | ||
| 437 | inet_twsk_deschedule(tw, twdr); | ||
| 438 | inet_twsk_put(tw); | ||
| 439 | |||
| 440 | goto restart; | ||
| 441 | } | ||
| 442 | write_unlock(lock); | ||
| 443 | } | ||
| 444 | local_bh_enable(); | ||
| 445 | } | ||
| 446 | EXPORT_SYMBOL_GPL(inet_twsk_purge); | ||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 44c1e934824b..1b4fee20fc93 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
| @@ -2376,6 +2376,7 @@ static int __net_init tcp_sk_init(struct net *net) | |||
| 2376 | static void __net_exit tcp_sk_exit(struct net *net) | 2376 | static void __net_exit tcp_sk_exit(struct net *net) |
| 2377 | { | 2377 | { |
| 2378 | inet_ctl_sock_destroy(net->ipv4.tcp_sock); | 2378 | inet_ctl_sock_destroy(net->ipv4.tcp_sock); |
| 2379 | inet_twsk_purge(net, &tcp_hashinfo, &tcp_death_row, AF_INET); | ||
| 2379 | } | 2380 | } |
| 2380 | 2381 | ||
| 2381 | static struct pernet_operations __net_initdata tcp_sk_ops = { | 2382 | static struct pernet_operations __net_initdata tcp_sk_ops = { |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 5b90b369ccb2..b585c850a89a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -2148,6 +2148,7 @@ static int tcpv6_net_init(struct net *net) | |||
| 2148 | static void tcpv6_net_exit(struct net *net) | 2148 | static void tcpv6_net_exit(struct net *net) |
| 2149 | { | 2149 | { |
| 2150 | inet_ctl_sock_destroy(net->ipv6.tcp_sk); | 2150 | inet_ctl_sock_destroy(net->ipv6.tcp_sk); |
| 2151 | inet_twsk_purge(net, &tcp_hashinfo, &tcp_death_row, AF_INET6); | ||
| 2151 | } | 2152 | } |
| 2152 | 2153 | ||
| 2153 | static struct pernet_operations tcpv6_net_ops = { | 2154 | static struct pernet_operations tcpv6_net_ops = { |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 9bb68c6a8f44..902cac1bd246 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
| @@ -478,21 +478,51 @@ int ieee80211_ht_addt_info_ie_to_ht_bss_info( | |||
| 478 | static void ieee80211_sta_send_associnfo(struct net_device *dev, | 478 | static void ieee80211_sta_send_associnfo(struct net_device *dev, |
| 479 | struct ieee80211_if_sta *ifsta) | 479 | struct ieee80211_if_sta *ifsta) |
| 480 | { | 480 | { |
| 481 | char *buf; | ||
| 482 | size_t len; | ||
| 483 | int i; | ||
| 481 | union iwreq_data wrqu; | 484 | union iwreq_data wrqu; |
| 482 | 485 | ||
| 486 | if (!ifsta->assocreq_ies && !ifsta->assocresp_ies) | ||
| 487 | return; | ||
| 488 | |||
| 489 | buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len + | ||
| 490 | ifsta->assocresp_ies_len), GFP_KERNEL); | ||
| 491 | if (!buf) | ||
| 492 | return; | ||
| 493 | |||
| 494 | len = sprintf(buf, "ASSOCINFO("); | ||
| 483 | if (ifsta->assocreq_ies) { | 495 | if (ifsta->assocreq_ies) { |
| 484 | memset(&wrqu, 0, sizeof(wrqu)); | 496 | len += sprintf(buf + len, "ReqIEs="); |
| 485 | wrqu.data.length = ifsta->assocreq_ies_len; | 497 | for (i = 0; i < ifsta->assocreq_ies_len; i++) { |
| 486 | wireless_send_event(dev, IWEVASSOCREQIE, &wrqu, | 498 | len += sprintf(buf + len, "%02x", |
| 487 | ifsta->assocreq_ies); | 499 | ifsta->assocreq_ies[i]); |
| 500 | } | ||
| 488 | } | 501 | } |
| 489 | |||
| 490 | if (ifsta->assocresp_ies) { | 502 | if (ifsta->assocresp_ies) { |
| 491 | memset(&wrqu, 0, sizeof(wrqu)); | 503 | if (ifsta->assocreq_ies) |
| 492 | wrqu.data.length = ifsta->assocresp_ies_len; | 504 | len += sprintf(buf + len, " "); |
| 493 | wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu, | 505 | len += sprintf(buf + len, "RespIEs="); |
| 494 | ifsta->assocresp_ies); | 506 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { |
| 507 | len += sprintf(buf + len, "%02x", | ||
| 508 | ifsta->assocresp_ies[i]); | ||
| 509 | } | ||
| 510 | } | ||
| 511 | len += sprintf(buf + len, ")"); | ||
| 512 | |||
| 513 | if (len > IW_CUSTOM_MAX) { | ||
| 514 | len = sprintf(buf, "ASSOCRESPIE="); | ||
| 515 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { | ||
| 516 | len += sprintf(buf + len, "%02x", | ||
| 517 | ifsta->assocresp_ies[i]); | ||
| 518 | } | ||
| 495 | } | 519 | } |
| 520 | |||
| 521 | memset(&wrqu, 0, sizeof(wrqu)); | ||
| 522 | wrqu.data.length = len; | ||
| 523 | wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); | ||
| 524 | |||
| 525 | kfree(buf); | ||
| 496 | } | 526 | } |
| 497 | 527 | ||
| 498 | 528 | ||
diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c index 1b1226d6653f..20633fdf7e6b 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c | |||
| @@ -68,11 +68,21 @@ static const char *const dccprotos[] = { | |||
| 68 | static int parse_dcc(char *data, const char *data_end, u_int32_t *ip, | 68 | static int parse_dcc(char *data, const char *data_end, u_int32_t *ip, |
| 69 | u_int16_t *port, char **ad_beg_p, char **ad_end_p) | 69 | u_int16_t *port, char **ad_beg_p, char **ad_end_p) |
| 70 | { | 70 | { |
| 71 | char *tmp; | ||
| 72 | |||
| 71 | /* at least 12: "AAAAAAAA P\1\n" */ | 73 | /* at least 12: "AAAAAAAA P\1\n" */ |
| 72 | while (*data++ != ' ') | 74 | while (*data++ != ' ') |
| 73 | if (data > data_end - 12) | 75 | if (data > data_end - 12) |
| 74 | return -1; | 76 | return -1; |
| 75 | 77 | ||
| 78 | /* Make sure we have a newline character within the packet boundaries | ||
| 79 | * because simple_strtoul parses until the first invalid character. */ | ||
| 80 | for (tmp = data; tmp <= data_end; tmp++) | ||
| 81 | if (*tmp == '\n') | ||
| 82 | break; | ||
| 83 | if (tmp > data_end || *tmp != '\n') | ||
| 84 | return -1; | ||
| 85 | |||
| 76 | *ad_beg_p = data; | 86 | *ad_beg_p = data; |
| 77 | *ip = simple_strtoul(data, &data, 10); | 87 | *ip = simple_strtoul(data, &data, 10); |
| 78 | 88 | ||
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c index 654a4f7f12c6..9bd03967fea4 100644 --- a/net/netfilter/nf_conntrack_proto_gre.c +++ b/net/netfilter/nf_conntrack_proto_gre.c | |||
| @@ -45,12 +45,12 @@ static LIST_HEAD(gre_keymap_list); | |||
| 45 | 45 | ||
| 46 | void nf_ct_gre_keymap_flush(void) | 46 | void nf_ct_gre_keymap_flush(void) |
| 47 | { | 47 | { |
| 48 | struct list_head *pos, *n; | 48 | struct nf_ct_gre_keymap *km, *tmp; |
| 49 | 49 | ||
| 50 | write_lock_bh(&nf_ct_gre_lock); | 50 | write_lock_bh(&nf_ct_gre_lock); |
| 51 | list_for_each_safe(pos, n, &gre_keymap_list) { | 51 | list_for_each_entry_safe(km, tmp, &gre_keymap_list, list) { |
| 52 | list_del(pos); | 52 | list_del(&km->list); |
| 53 | kfree(pos); | 53 | kfree(km); |
| 54 | } | 54 | } |
| 55 | write_unlock_bh(&nf_ct_gre_lock); | 55 | write_unlock_bh(&nf_ct_gre_lock); |
| 56 | } | 56 | } |
| @@ -97,10 +97,14 @@ int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir, | |||
| 97 | kmp = &help->help.ct_pptp_info.keymap[dir]; | 97 | kmp = &help->help.ct_pptp_info.keymap[dir]; |
| 98 | if (*kmp) { | 98 | if (*kmp) { |
| 99 | /* check whether it's a retransmission */ | 99 | /* check whether it's a retransmission */ |
| 100 | read_lock_bh(&nf_ct_gre_lock); | ||
| 100 | list_for_each_entry(km, &gre_keymap_list, list) { | 101 | list_for_each_entry(km, &gre_keymap_list, list) { |
| 101 | if (gre_key_cmpfn(km, t) && km == *kmp) | 102 | if (gre_key_cmpfn(km, t) && km == *kmp) { |
| 103 | read_unlock_bh(&nf_ct_gre_lock); | ||
| 102 | return 0; | 104 | return 0; |
| 105 | } | ||
| 103 | } | 106 | } |
| 107 | read_unlock_bh(&nf_ct_gre_lock); | ||
| 104 | pr_debug("trying to override keymap_%s for ct %p\n", | 108 | pr_debug("trying to override keymap_%s for ct %p\n", |
| 105 | dir == IP_CT_DIR_REPLY ? "reply" : "orig", ct); | 109 | dir == IP_CT_DIR_REPLY ? "reply" : "orig", ct); |
| 106 | return -EEXIST; | 110 | return -EEXIST; |
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 2f9bbc058b48..1fa306be60fb 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
| @@ -1193,7 +1193,6 @@ static const struct sip_handler sip_handlers[] = { | |||
| 1193 | static int process_sip_response(struct sk_buff *skb, | 1193 | static int process_sip_response(struct sk_buff *skb, |
| 1194 | const char **dptr, unsigned int *datalen) | 1194 | const char **dptr, unsigned int *datalen) |
| 1195 | { | 1195 | { |
| 1196 | static const struct sip_handler *handler; | ||
| 1197 | enum ip_conntrack_info ctinfo; | 1196 | enum ip_conntrack_info ctinfo; |
| 1198 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); | 1197 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 1199 | unsigned int matchoff, matchlen; | 1198 | unsigned int matchoff, matchlen; |
| @@ -1214,6 +1213,8 @@ static int process_sip_response(struct sk_buff *skb, | |||
| 1214 | dataoff = matchoff + matchlen + 1; | 1213 | dataoff = matchoff + matchlen + 1; |
| 1215 | 1214 | ||
| 1216 | for (i = 0; i < ARRAY_SIZE(sip_handlers); i++) { | 1215 | for (i = 0; i < ARRAY_SIZE(sip_handlers); i++) { |
| 1216 | const struct sip_handler *handler; | ||
| 1217 | |||
| 1217 | handler = &sip_handlers[i]; | 1218 | handler = &sip_handlers[i]; |
| 1218 | if (handler->response == NULL) | 1219 | if (handler->response == NULL) |
| 1219 | continue; | 1220 | continue; |
| @@ -1228,13 +1229,14 @@ static int process_sip_response(struct sk_buff *skb, | |||
| 1228 | static int process_sip_request(struct sk_buff *skb, | 1229 | static int process_sip_request(struct sk_buff *skb, |
| 1229 | const char **dptr, unsigned int *datalen) | 1230 | const char **dptr, unsigned int *datalen) |
| 1230 | { | 1231 | { |
| 1231 | static const struct sip_handler *handler; | ||
| 1232 | enum ip_conntrack_info ctinfo; | 1232 | enum ip_conntrack_info ctinfo; |
| 1233 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); | 1233 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 1234 | unsigned int matchoff, matchlen; | 1234 | unsigned int matchoff, matchlen; |
| 1235 | unsigned int cseq, i; | 1235 | unsigned int cseq, i; |
| 1236 | 1236 | ||
| 1237 | for (i = 0; i < ARRAY_SIZE(sip_handlers); i++) { | 1237 | for (i = 0; i < ARRAY_SIZE(sip_handlers); i++) { |
| 1238 | const struct sip_handler *handler; | ||
| 1239 | |||
| 1238 | handler = &sip_handlers[i]; | 1240 | handler = &sip_handlers[i]; |
| 1239 | if (handler->request == NULL) | 1241 | if (handler->request == NULL) |
| 1240 | continue; | 1242 | continue; |
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index b1ff16aa4bdb..3ddaff42d1bb 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
| @@ -96,8 +96,8 @@ struct bcbearer { | |||
| 96 | struct media media; | 96 | struct media media; |
| 97 | struct bcbearer_pair bpairs[MAX_BEARERS]; | 97 | struct bcbearer_pair bpairs[MAX_BEARERS]; |
| 98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; | 98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; |
| 99 | struct node_map remains; | 99 | struct tipc_node_map remains; |
| 100 | struct node_map remains_new; | 100 | struct tipc_node_map remains_new; |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
| 103 | /** | 103 | /** |
| @@ -110,7 +110,7 @@ struct bcbearer { | |||
| 110 | 110 | ||
| 111 | struct bclink { | 111 | struct bclink { |
| 112 | struct link link; | 112 | struct link link; |
| 113 | struct node node; | 113 | struct tipc_node node; |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | 116 | ||
| @@ -149,7 +149,7 @@ static void bcbuf_decr_acks(struct sk_buff *buf) | |||
| 149 | * Called with 'node' locked, bc_lock unlocked | 149 | * Called with 'node' locked, bc_lock unlocked |
| 150 | */ | 150 | */ |
| 151 | 151 | ||
| 152 | static void bclink_set_gap(struct node *n_ptr) | 152 | static void bclink_set_gap(struct tipc_node *n_ptr) |
| 153 | { | 153 | { |
| 154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; | 154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; |
| 155 | 155 | ||
| @@ -202,7 +202,7 @@ static void bclink_retransmit_pkt(u32 after, u32 to) | |||
| 202 | * Node is locked, bc_lock unlocked. | 202 | * Node is locked, bc_lock unlocked. |
| 203 | */ | 203 | */ |
| 204 | 204 | ||
| 205 | void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | 205 | void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked) |
| 206 | { | 206 | { |
| 207 | struct sk_buff *crs; | 207 | struct sk_buff *crs; |
| 208 | struct sk_buff *next; | 208 | struct sk_buff *next; |
| @@ -250,7 +250,7 @@ void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | |||
| 250 | * tipc_net_lock and node lock set | 250 | * tipc_net_lock and node lock set |
| 251 | */ | 251 | */ |
| 252 | 252 | ||
| 253 | static void bclink_send_ack(struct node *n_ptr) | 253 | static void bclink_send_ack(struct tipc_node *n_ptr) |
| 254 | { | 254 | { |
| 255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; | 255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; |
| 256 | 256 | ||
| @@ -264,7 +264,7 @@ static void bclink_send_ack(struct node *n_ptr) | |||
| 264 | * tipc_net_lock and node lock set | 264 | * tipc_net_lock and node lock set |
| 265 | */ | 265 | */ |
| 266 | 266 | ||
| 267 | static void bclink_send_nack(struct node *n_ptr) | 267 | static void bclink_send_nack(struct tipc_node *n_ptr) |
| 268 | { | 268 | { |
| 269 | struct sk_buff *buf; | 269 | struct sk_buff *buf; |
| 270 | struct tipc_msg *msg; | 270 | struct tipc_msg *msg; |
| @@ -308,7 +308,7 @@ static void bclink_send_nack(struct node *n_ptr) | |||
| 308 | * tipc_net_lock and node lock set | 308 | * tipc_net_lock and node lock set |
| 309 | */ | 309 | */ |
| 310 | 310 | ||
| 311 | void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | 311 | void tipc_bclink_check_gap(struct tipc_node *n_ptr, u32 last_sent) |
| 312 | { | 312 | { |
| 313 | if (!n_ptr->bclink.supported || | 313 | if (!n_ptr->bclink.supported || |
| 314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) | 314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) |
| @@ -328,7 +328,7 @@ void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | |||
| 328 | 328 | ||
| 329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) | 329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) |
| 330 | { | 330 | { |
| 331 | struct node *n_ptr = tipc_node_find(dest); | 331 | struct tipc_node *n_ptr = tipc_node_find(dest); |
| 332 | u32 my_after, my_to; | 332 | u32 my_after, my_to; |
| 333 | 333 | ||
| 334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) | 334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) |
| @@ -418,7 +418,7 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) | |||
| 418 | static int rx_count = 0; | 418 | static int rx_count = 0; |
| 419 | #endif | 419 | #endif |
| 420 | struct tipc_msg *msg = buf_msg(buf); | 420 | struct tipc_msg *msg = buf_msg(buf); |
| 421 | struct node* node = tipc_node_find(msg_prevnode(msg)); | 421 | struct tipc_node* node = tipc_node_find(msg_prevnode(msg)); |
| 422 | u32 next_in; | 422 | u32 next_in; |
| 423 | u32 seqno; | 423 | u32 seqno; |
| 424 | struct sk_buff *deferred; | 424 | struct sk_buff *deferred; |
| @@ -538,7 +538,7 @@ u32 tipc_bclink_get_last_sent(void) | |||
| 538 | return last_sent; | 538 | return last_sent; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | u32 tipc_bclink_acks_missing(struct node *n_ptr) | 541 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr) |
| 542 | { | 542 | { |
| 543 | return (n_ptr->bclink.supported && | 543 | return (n_ptr->bclink.supported && |
| 544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); | 544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); |
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h index a2416fa6b906..5aa024b99c55 100644 --- a/net/tipc/bcast.h +++ b/net/tipc/bcast.h | |||
| @@ -41,12 +41,12 @@ | |||
| 41 | #define WSIZE 32 | 41 | #define WSIZE 32 |
| 42 | 42 | ||
| 43 | /** | 43 | /** |
| 44 | * struct node_map - set of node identifiers | 44 | * struct tipc_node_map - set of node identifiers |
| 45 | * @count: # of nodes in set | 45 | * @count: # of nodes in set |
| 46 | * @map: bitmap of node identifiers that are in the set | 46 | * @map: bitmap of node identifiers that are in the set |
| 47 | */ | 47 | */ |
| 48 | 48 | ||
| 49 | struct node_map { | 49 | struct tipc_node_map { |
| 50 | u32 count; | 50 | u32 count; |
| 51 | u32 map[MAX_NODES / WSIZE]; | 51 | u32 map[MAX_NODES / WSIZE]; |
| 52 | }; | 52 | }; |
| @@ -68,7 +68,7 @@ struct port_list { | |||
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | struct node; | 71 | struct tipc_node; |
| 72 | 72 | ||
| 73 | extern char tipc_bclink_name[]; | 73 | extern char tipc_bclink_name[]; |
| 74 | 74 | ||
| @@ -77,7 +77,7 @@ extern char tipc_bclink_name[]; | |||
| 77 | * nmap_add - add a node to a node map | 77 | * nmap_add - add a node to a node map |
| 78 | */ | 78 | */ |
| 79 | 79 | ||
| 80 | static inline void tipc_nmap_add(struct node_map *nm_ptr, u32 node) | 80 | static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node) |
| 81 | { | 81 | { |
| 82 | int n = tipc_node(node); | 82 | int n = tipc_node(node); |
| 83 | int w = n / WSIZE; | 83 | int w = n / WSIZE; |
| @@ -93,7 +93,7 @@ static inline void tipc_nmap_add(struct node_map *nm_ptr, u32 node) | |||
| 93 | * nmap_remove - remove a node from a node map | 93 | * nmap_remove - remove a node from a node map |
| 94 | */ | 94 | */ |
| 95 | 95 | ||
| 96 | static inline void tipc_nmap_remove(struct node_map *nm_ptr, u32 node) | 96 | static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node) |
| 97 | { | 97 | { |
| 98 | int n = tipc_node(node); | 98 | int n = tipc_node(node); |
| 99 | int w = n / WSIZE; | 99 | int w = n / WSIZE; |
| @@ -109,7 +109,7 @@ static inline void tipc_nmap_remove(struct node_map *nm_ptr, u32 node) | |||
| 109 | * nmap_equal - test for equality of node maps | 109 | * nmap_equal - test for equality of node maps |
| 110 | */ | 110 | */ |
| 111 | 111 | ||
| 112 | static inline int tipc_nmap_equal(struct node_map *nm_a, struct node_map *nm_b) | 112 | static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b) |
| 113 | { | 113 | { |
| 114 | return !memcmp(nm_a, nm_b, sizeof(*nm_a)); | 114 | return !memcmp(nm_a, nm_b, sizeof(*nm_a)); |
| 115 | } | 115 | } |
| @@ -121,8 +121,8 @@ static inline int tipc_nmap_equal(struct node_map *nm_a, struct node_map *nm_b) | |||
| 121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) | 121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) |
| 122 | */ | 122 | */ |
| 123 | 123 | ||
| 124 | static inline void tipc_nmap_diff(struct node_map *nm_a, struct node_map *nm_b, | 124 | static inline void tipc_nmap_diff(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b, |
| 125 | struct node_map *nm_diff) | 125 | struct tipc_node_map *nm_diff) |
| 126 | { | 126 | { |
| 127 | int stop = sizeof(nm_a->map) / sizeof(u32); | 127 | int stop = sizeof(nm_a->map) / sizeof(u32); |
| 128 | int w; | 128 | int w; |
| @@ -195,12 +195,12 @@ static inline void tipc_port_list_free(struct port_list *pl_ptr) | |||
| 195 | 195 | ||
| 196 | int tipc_bclink_init(void); | 196 | int tipc_bclink_init(void); |
| 197 | void tipc_bclink_stop(void); | 197 | void tipc_bclink_stop(void); |
| 198 | void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked); | 198 | void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked); |
| 199 | int tipc_bclink_send_msg(struct sk_buff *buf); | 199 | int tipc_bclink_send_msg(struct sk_buff *buf); |
| 200 | void tipc_bclink_recv_pkt(struct sk_buff *buf); | 200 | void tipc_bclink_recv_pkt(struct sk_buff *buf); |
| 201 | u32 tipc_bclink_get_last_sent(void); | 201 | u32 tipc_bclink_get_last_sent(void); |
| 202 | u32 tipc_bclink_acks_missing(struct node *n_ptr); | 202 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr); |
| 203 | void tipc_bclink_check_gap(struct node *n_ptr, u32 seqno); | 203 | void tipc_bclink_check_gap(struct tipc_node *n_ptr, u32 seqno); |
| 204 | int tipc_bclink_stats(char *stats_buf, const u32 buf_size); | 204 | int tipc_bclink_stats(char *stats_buf, const u32 buf_size); |
| 205 | int tipc_bclink_reset_stats(void); | 205 | int tipc_bclink_reset_stats(void); |
| 206 | int tipc_bclink_set_queue_limits(u32 limit); | 206 | int tipc_bclink_set_queue_limits(u32 limit); |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 6a9aba3edd08..a7a36779b9b3 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
| @@ -599,7 +599,7 @@ int tipc_block_bearer(const char *name) | |||
| 599 | spin_lock_bh(&b_ptr->publ.lock); | 599 | spin_lock_bh(&b_ptr->publ.lock); |
| 600 | b_ptr->publ.blocked = 1; | 600 | b_ptr->publ.blocked = 1; |
| 601 | list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { | 601 | list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { |
| 602 | struct node *n_ptr = l_ptr->owner; | 602 | struct tipc_node *n_ptr = l_ptr->owner; |
| 603 | 603 | ||
| 604 | spin_lock_bh(&n_ptr->lock); | 604 | spin_lock_bh(&n_ptr->lock); |
| 605 | tipc_link_reset(l_ptr); | 605 | tipc_link_reset(l_ptr); |
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index 6a36b6600e6c..ca5734892713 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h | |||
| @@ -104,7 +104,7 @@ struct bearer { | |||
| 104 | u32 continue_count; | 104 | u32 continue_count; |
| 105 | int active; | 105 | int active; |
| 106 | char net_plane; | 106 | char net_plane; |
| 107 | struct node_map nodes; | 107 | struct tipc_node_map nodes; |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | struct bearer_name { | 110 | struct bearer_name { |
diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c index 46ee6c58532d..689fdefe9d04 100644 --- a/net/tipc/cluster.c +++ b/net/tipc/cluster.c | |||
| @@ -48,8 +48,8 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, | |||
| 48 | u32 lower, u32 upper); | 48 | u32 lower, u32 upper); |
| 49 | static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); | 49 | static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); |
| 50 | 50 | ||
| 51 | struct node **tipc_local_nodes = NULL; | 51 | struct tipc_node **tipc_local_nodes = NULL; |
| 52 | struct node_map tipc_cltr_bcast_nodes = {0,{0,}}; | 52 | struct tipc_node_map tipc_cltr_bcast_nodes = {0,{0,}}; |
| 53 | u32 tipc_highest_allowed_slave = 0; | 53 | u32 tipc_highest_allowed_slave = 0; |
| 54 | 54 | ||
| 55 | struct cluster *tipc_cltr_create(u32 addr) | 55 | struct cluster *tipc_cltr_create(u32 addr) |
| @@ -115,7 +115,7 @@ void tipc_cltr_delete(struct cluster *c_ptr) | |||
| 115 | 115 | ||
| 116 | u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) | 116 | u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) |
| 117 | { | 117 | { |
| 118 | struct node *n_ptr; | 118 | struct tipc_node *n_ptr; |
| 119 | u32 n_num = tipc_node(addr) + 1; | 119 | u32 n_num = tipc_node(addr) + 1; |
| 120 | 120 | ||
| 121 | if (!c_ptr) | 121 | if (!c_ptr) |
| @@ -133,7 +133,7 @@ u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) | |||
| 133 | return 0; | 133 | return 0; |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct node *n_ptr) | 136 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct tipc_node *n_ptr) |
| 137 | { | 137 | { |
| 138 | u32 n_num = tipc_node(n_ptr->addr); | 138 | u32 n_num = tipc_node(n_ptr->addr); |
| 139 | u32 max_n_num = tipc_max_nodes; | 139 | u32 max_n_num = tipc_max_nodes; |
| @@ -196,7 +196,7 @@ u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref) | |||
| 196 | * Uses deterministic and fair algorithm. | 196 | * Uses deterministic and fair algorithm. |
| 197 | */ | 197 | */ |
| 198 | 198 | ||
| 199 | struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) | 199 | struct tipc_node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) |
| 200 | { | 200 | { |
| 201 | u32 n_num; | 201 | u32 n_num; |
| 202 | u32 mask = tipc_max_nodes; | 202 | u32 mask = tipc_max_nodes; |
| @@ -379,7 +379,7 @@ void tipc_cltr_recv_routing_table(struct sk_buff *buf) | |||
| 379 | { | 379 | { |
| 380 | struct tipc_msg *msg = buf_msg(buf); | 380 | struct tipc_msg *msg = buf_msg(buf); |
| 381 | struct cluster *c_ptr; | 381 | struct cluster *c_ptr; |
| 382 | struct node *n_ptr; | 382 | struct tipc_node *n_ptr; |
| 383 | unchar *node_table; | 383 | unchar *node_table; |
| 384 | u32 table_size; | 384 | u32 table_size; |
| 385 | u32 router; | 385 | u32 router; |
| @@ -499,7 +499,7 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, | |||
| 499 | u32 lower, u32 upper) | 499 | u32 lower, u32 upper) |
| 500 | { | 500 | { |
| 501 | struct sk_buff *buf_copy; | 501 | struct sk_buff *buf_copy; |
| 502 | struct node *n_ptr; | 502 | struct tipc_node *n_ptr; |
| 503 | u32 n_num; | 503 | u32 n_num; |
| 504 | u32 tstop; | 504 | u32 tstop; |
| 505 | 505 | ||
| @@ -534,7 +534,7 @@ void tipc_cltr_broadcast(struct sk_buff *buf) | |||
| 534 | { | 534 | { |
| 535 | struct sk_buff *buf_copy; | 535 | struct sk_buff *buf_copy; |
| 536 | struct cluster *c_ptr; | 536 | struct cluster *c_ptr; |
| 537 | struct node *n_ptr; | 537 | struct tipc_node *n_ptr; |
| 538 | u32 n_num; | 538 | u32 n_num; |
| 539 | u32 tstart; | 539 | u32 tstart; |
| 540 | u32 tstop; | 540 | u32 tstop; |
diff --git a/net/tipc/cluster.h b/net/tipc/cluster.h index 62df074afaec..333efb0b9c44 100644 --- a/net/tipc/cluster.h +++ b/net/tipc/cluster.h | |||
| @@ -54,24 +54,24 @@ | |||
| 54 | struct cluster { | 54 | struct cluster { |
| 55 | u32 addr; | 55 | u32 addr; |
| 56 | struct _zone *owner; | 56 | struct _zone *owner; |
| 57 | struct node **nodes; | 57 | struct tipc_node **nodes; |
| 58 | u32 highest_node; | 58 | u32 highest_node; |
| 59 | u32 highest_slave; | 59 | u32 highest_slave; |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | extern struct node **tipc_local_nodes; | 63 | extern struct tipc_node **tipc_local_nodes; |
| 64 | extern u32 tipc_highest_allowed_slave; | 64 | extern u32 tipc_highest_allowed_slave; |
| 65 | extern struct node_map tipc_cltr_bcast_nodes; | 65 | extern struct tipc_node_map tipc_cltr_bcast_nodes; |
| 66 | 66 | ||
| 67 | void tipc_cltr_remove_as_router(struct cluster *c_ptr, u32 router); | 67 | void tipc_cltr_remove_as_router(struct cluster *c_ptr, u32 router); |
| 68 | void tipc_cltr_send_ext_routes(struct cluster *c_ptr, u32 dest); | 68 | void tipc_cltr_send_ext_routes(struct cluster *c_ptr, u32 dest); |
| 69 | struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector); | 69 | struct tipc_node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector); |
| 70 | u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref); | 70 | u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref); |
| 71 | void tipc_cltr_recv_routing_table(struct sk_buff *buf); | 71 | void tipc_cltr_recv_routing_table(struct sk_buff *buf); |
| 72 | struct cluster *tipc_cltr_create(u32 addr); | 72 | struct cluster *tipc_cltr_create(u32 addr); |
| 73 | void tipc_cltr_delete(struct cluster *c_ptr); | 73 | void tipc_cltr_delete(struct cluster *c_ptr); |
| 74 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct node *n_ptr); | 74 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct tipc_node *n_ptr); |
| 75 | void tipc_cltr_send_slave_routes(struct cluster *c_ptr, u32 dest); | 75 | void tipc_cltr_send_slave_routes(struct cluster *c_ptr, u32 dest); |
| 76 | void tipc_cltr_broadcast(struct sk_buff *buf); | 76 | void tipc_cltr_broadcast(struct sk_buff *buf); |
| 77 | int tipc_cltr_init(void); | 77 | int tipc_cltr_init(void); |
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index 1657f0e795ff..74b7d1e28aec 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
| @@ -193,7 +193,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr) | |||
| 193 | /* Always accept link here */ | 193 | /* Always accept link here */ |
| 194 | struct sk_buff *rbuf; | 194 | struct sk_buff *rbuf; |
| 195 | struct tipc_media_addr *addr; | 195 | struct tipc_media_addr *addr; |
| 196 | struct node *n_ptr = tipc_node_find(orig); | 196 | struct tipc_node *n_ptr = tipc_node_find(orig); |
| 197 | int link_fully_up; | 197 | int link_fully_up; |
| 198 | 198 | ||
| 199 | dbg(" in own cluster\n"); | 199 | dbg(" in own cluster\n"); |
diff --git a/net/tipc/link.c b/net/tipc/link.c index d60113ba4b1b..dd4c18b9a35b 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
| @@ -1155,7 +1155,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
| 1155 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) | 1155 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) |
| 1156 | { | 1156 | { |
| 1157 | struct link *l_ptr; | 1157 | struct link *l_ptr; |
| 1158 | struct node *n_ptr; | 1158 | struct tipc_node *n_ptr; |
| 1159 | int res = -ELINKCONG; | 1159 | int res = -ELINKCONG; |
| 1160 | 1160 | ||
| 1161 | read_lock_bh(&tipc_net_lock); | 1161 | read_lock_bh(&tipc_net_lock); |
| @@ -1226,7 +1226,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, | |||
| 1226 | int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) | 1226 | int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) |
| 1227 | { | 1227 | { |
| 1228 | struct link *l_ptr; | 1228 | struct link *l_ptr; |
| 1229 | struct node *n_ptr; | 1229 | struct tipc_node *n_ptr; |
| 1230 | int res; | 1230 | int res; |
| 1231 | u32 selector = msg_origport(buf_msg(buf)) & 1; | 1231 | u32 selector = msg_origport(buf_msg(buf)) & 1; |
| 1232 | u32 dummy; | 1232 | u32 dummy; |
| @@ -1270,7 +1270,7 @@ int tipc_link_send_sections_fast(struct port *sender, | |||
| 1270 | struct tipc_msg *hdr = &sender->publ.phdr; | 1270 | struct tipc_msg *hdr = &sender->publ.phdr; |
| 1271 | struct link *l_ptr; | 1271 | struct link *l_ptr; |
| 1272 | struct sk_buff *buf; | 1272 | struct sk_buff *buf; |
| 1273 | struct node *node; | 1273 | struct tipc_node *node; |
| 1274 | int res; | 1274 | int res; |
| 1275 | u32 selector = msg_origport(hdr) & 1; | 1275 | u32 selector = msg_origport(hdr) & 1; |
| 1276 | 1276 | ||
| @@ -1364,7 +1364,7 @@ static int link_send_sections_long(struct port *sender, | |||
| 1364 | u32 destaddr) | 1364 | u32 destaddr) |
| 1365 | { | 1365 | { |
| 1366 | struct link *l_ptr; | 1366 | struct link *l_ptr; |
| 1367 | struct node *node; | 1367 | struct tipc_node *node; |
| 1368 | struct tipc_msg *hdr = &sender->publ.phdr; | 1368 | struct tipc_msg *hdr = &sender->publ.phdr; |
| 1369 | u32 dsz = msg_data_sz(hdr); | 1369 | u32 dsz = msg_data_sz(hdr); |
| 1370 | u32 max_pkt,fragm_sz,rest; | 1370 | u32 max_pkt,fragm_sz,rest; |
| @@ -1636,7 +1636,7 @@ void tipc_link_push_queue(struct link *l_ptr) | |||
| 1636 | 1636 | ||
| 1637 | static void link_reset_all(unsigned long addr) | 1637 | static void link_reset_all(unsigned long addr) |
| 1638 | { | 1638 | { |
| 1639 | struct node *n_ptr; | 1639 | struct tipc_node *n_ptr; |
| 1640 | char addr_string[16]; | 1640 | char addr_string[16]; |
| 1641 | u32 i; | 1641 | u32 i; |
| 1642 | 1642 | ||
| @@ -1682,7 +1682,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) | |||
| 1682 | 1682 | ||
| 1683 | /* Handle failure on broadcast link */ | 1683 | /* Handle failure on broadcast link */ |
| 1684 | 1684 | ||
| 1685 | struct node *n_ptr; | 1685 | struct tipc_node *n_ptr; |
| 1686 | char addr_string[16]; | 1686 | char addr_string[16]; |
| 1687 | 1687 | ||
| 1688 | tipc_printf(TIPC_OUTPUT, "Msg seq number: %u, ", msg_seqno(msg)); | 1688 | tipc_printf(TIPC_OUTPUT, "Msg seq number: %u, ", msg_seqno(msg)); |
| @@ -1843,7 +1843,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | |||
| 1843 | read_lock_bh(&tipc_net_lock); | 1843 | read_lock_bh(&tipc_net_lock); |
| 1844 | while (head) { | 1844 | while (head) { |
| 1845 | struct bearer *b_ptr = (struct bearer *)tb_ptr; | 1845 | struct bearer *b_ptr = (struct bearer *)tb_ptr; |
| 1846 | struct node *n_ptr; | 1846 | struct tipc_node *n_ptr; |
| 1847 | struct link *l_ptr; | 1847 | struct link *l_ptr; |
| 1848 | struct sk_buff *crs; | 1848 | struct sk_buff *crs; |
| 1849 | struct sk_buff *buf = head; | 1849 | struct sk_buff *buf = head; |
| @@ -2935,7 +2935,7 @@ void tipc_link_set_queue_limits(struct link *l_ptr, u32 window) | |||
| 2935 | * Returns pointer to link (or 0 if invalid link name). | 2935 | * Returns pointer to link (or 0 if invalid link name). |
| 2936 | */ | 2936 | */ |
| 2937 | 2937 | ||
| 2938 | static struct link *link_find_link(const char *name, struct node **node) | 2938 | static struct link *link_find_link(const char *name, struct tipc_node **node) |
| 2939 | { | 2939 | { |
| 2940 | struct link_name link_name_parts; | 2940 | struct link_name link_name_parts; |
| 2941 | struct bearer *b_ptr; | 2941 | struct bearer *b_ptr; |
| @@ -2965,7 +2965,7 @@ struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space | |||
| 2965 | struct tipc_link_config *args; | 2965 | struct tipc_link_config *args; |
| 2966 | u32 new_value; | 2966 | u32 new_value; |
| 2967 | struct link *l_ptr; | 2967 | struct link *l_ptr; |
| 2968 | struct node *node; | 2968 | struct tipc_node *node; |
| 2969 | int res; | 2969 | int res; |
| 2970 | 2970 | ||
| 2971 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_CONFIG)) | 2971 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_CONFIG)) |
| @@ -3043,7 +3043,7 @@ struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_ | |||
| 3043 | { | 3043 | { |
| 3044 | char *link_name; | 3044 | char *link_name; |
| 3045 | struct link *l_ptr; | 3045 | struct link *l_ptr; |
| 3046 | struct node *node; | 3046 | struct tipc_node *node; |
| 3047 | 3047 | ||
| 3048 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME)) | 3048 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME)) |
| 3049 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | 3049 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); |
| @@ -3091,7 +3091,7 @@ static int tipc_link_stats(const char *name, char *buf, const u32 buf_size) | |||
| 3091 | { | 3091 | { |
| 3092 | struct print_buf pb; | 3092 | struct print_buf pb; |
| 3093 | struct link *l_ptr; | 3093 | struct link *l_ptr; |
| 3094 | struct node *node; | 3094 | struct tipc_node *node; |
| 3095 | char *status; | 3095 | char *status; |
| 3096 | u32 profile_total = 0; | 3096 | u32 profile_total = 0; |
| 3097 | 3097 | ||
| @@ -3207,7 +3207,7 @@ int link_control(const char *name, u32 op, u32 val) | |||
| 3207 | int res = -EINVAL; | 3207 | int res = -EINVAL; |
| 3208 | struct link *l_ptr; | 3208 | struct link *l_ptr; |
| 3209 | u32 bearer_id; | 3209 | u32 bearer_id; |
| 3210 | struct node * node; | 3210 | struct tipc_node * node; |
| 3211 | u32 a; | 3211 | u32 a; |
| 3212 | 3212 | ||
| 3213 | a = link_name2addr(name, &bearer_id); | 3213 | a = link_name2addr(name, &bearer_id); |
| @@ -3249,7 +3249,7 @@ int link_control(const char *name, u32 op, u32 val) | |||
| 3249 | 3249 | ||
| 3250 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector) | 3250 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector) |
| 3251 | { | 3251 | { |
| 3252 | struct node *n_ptr; | 3252 | struct tipc_node *n_ptr; |
| 3253 | struct link *l_ptr; | 3253 | struct link *l_ptr; |
| 3254 | u32 res = MAX_PKT_DEFAULT; | 3254 | u32 res = MAX_PKT_DEFAULT; |
| 3255 | 3255 | ||
diff --git a/net/tipc/link.h b/net/tipc/link.h index 52f3e7c1871f..6a51e38ad25c 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
| @@ -116,7 +116,7 @@ struct link { | |||
| 116 | char name[TIPC_MAX_LINK_NAME]; | 116 | char name[TIPC_MAX_LINK_NAME]; |
| 117 | struct tipc_media_addr media_addr; | 117 | struct tipc_media_addr media_addr; |
| 118 | struct timer_list timer; | 118 | struct timer_list timer; |
| 119 | struct node *owner; | 119 | struct tipc_node *owner; |
| 120 | struct list_head link_list; | 120 | struct list_head link_list; |
| 121 | 121 | ||
| 122 | /* Management and link supervision data */ | 122 | /* Management and link supervision data */ |
diff --git a/net/tipc/name_table.h b/net/tipc/name_table.h index b9e7cd336d76..139882d4ed00 100644 --- a/net/tipc/name_table.h +++ b/net/tipc/name_table.h | |||
| @@ -76,7 +76,7 @@ struct publication { | |||
| 76 | u32 node; | 76 | u32 node; |
| 77 | u32 ref; | 77 | u32 ref; |
| 78 | u32 key; | 78 | u32 key; |
| 79 | struct node_subscr subscr; | 79 | struct tipc_node_subscr subscr; |
| 80 | struct list_head local_list; | 80 | struct list_head local_list; |
| 81 | struct list_head pport_list; | 81 | struct list_head pport_list; |
| 82 | struct publication *node_list_next; | 82 | struct publication *node_list_next; |
diff --git a/net/tipc/net.c b/net/tipc/net.c index ec7b04fbdc43..7906608bf510 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
| @@ -118,7 +118,7 @@ | |||
| 118 | DEFINE_RWLOCK(tipc_net_lock); | 118 | DEFINE_RWLOCK(tipc_net_lock); |
| 119 | struct network tipc_net = { NULL }; | 119 | struct network tipc_net = { NULL }; |
| 120 | 120 | ||
| 121 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref) | 121 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) |
| 122 | { | 122 | { |
| 123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); | 123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); |
| 124 | } | 124 | } |
diff --git a/net/tipc/net.h b/net/tipc/net.h index d154ac2bda9a..de2b9ad8f646 100644 --- a/net/tipc/net.h +++ b/net/tipc/net.h | |||
| @@ -55,7 +55,7 @@ extern rwlock_t tipc_net_lock; | |||
| 55 | void tipc_net_remove_as_router(u32 router); | 55 | void tipc_net_remove_as_router(u32 router); |
| 56 | void tipc_net_send_external_routes(u32 dest); | 56 | void tipc_net_send_external_routes(u32 dest); |
| 57 | void tipc_net_route_msg(struct sk_buff *buf); | 57 | void tipc_net_route_msg(struct sk_buff *buf); |
| 58 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref); | 58 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref); |
| 59 | u32 tipc_net_select_router(u32 addr, u32 ref); | 59 | u32 tipc_net_select_router(u32 addr, u32 ref); |
| 60 | 60 | ||
| 61 | int tipc_net_start(u32 addr); | 61 | int tipc_net_start(u32 addr); |
diff --git a/net/tipc/node.c b/net/tipc/node.c index ee952ad60218..20d98c56e152 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
| @@ -46,11 +46,11 @@ | |||
| 46 | #include "bearer.h" | 46 | #include "bearer.h" |
| 47 | #include "name_distr.h" | 47 | #include "name_distr.h" |
| 48 | 48 | ||
| 49 | void node_print(struct print_buf *buf, struct node *n_ptr, char *str); | 49 | void node_print(struct print_buf *buf, struct tipc_node *n_ptr, char *str); |
| 50 | static void node_lost_contact(struct node *n_ptr); | 50 | static void node_lost_contact(struct tipc_node *n_ptr); |
| 51 | static void node_established_contact(struct node *n_ptr); | 51 | static void node_established_contact(struct tipc_node *n_ptr); |
| 52 | 52 | ||
| 53 | struct node *tipc_nodes = NULL; /* sorted list of nodes within cluster */ | 53 | struct tipc_node *tipc_nodes = NULL; /* sorted list of nodes within cluster */ |
| 54 | 54 | ||
| 55 | static DEFINE_SPINLOCK(node_create_lock); | 55 | static DEFINE_SPINLOCK(node_create_lock); |
| 56 | 56 | ||
| @@ -66,11 +66,11 @@ u32 tipc_own_tag = 0; | |||
| 66 | * but this is a non-trivial change.) | 66 | * but this is a non-trivial change.) |
| 67 | */ | 67 | */ |
| 68 | 68 | ||
| 69 | struct node *tipc_node_create(u32 addr) | 69 | struct tipc_node *tipc_node_create(u32 addr) |
| 70 | { | 70 | { |
| 71 | struct cluster *c_ptr; | 71 | struct cluster *c_ptr; |
| 72 | struct node *n_ptr; | 72 | struct tipc_node *n_ptr; |
| 73 | struct node **curr_node; | 73 | struct tipc_node **curr_node; |
| 74 | 74 | ||
| 75 | spin_lock_bh(&node_create_lock); | 75 | spin_lock_bh(&node_create_lock); |
| 76 | 76 | ||
| @@ -120,7 +120,7 @@ struct node *tipc_node_create(u32 addr) | |||
| 120 | return n_ptr; | 120 | return n_ptr; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | void tipc_node_delete(struct node *n_ptr) | 123 | void tipc_node_delete(struct tipc_node *n_ptr) |
| 124 | { | 124 | { |
| 125 | if (!n_ptr) | 125 | if (!n_ptr) |
| 126 | return; | 126 | return; |
| @@ -146,7 +146,7 @@ void tipc_node_delete(struct node *n_ptr) | |||
| 146 | * Link becomes active (alone or shared) or standby, depending on its priority. | 146 | * Link becomes active (alone or shared) or standby, depending on its priority. |
| 147 | */ | 147 | */ |
| 148 | 148 | ||
| 149 | void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) | 149 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr) |
| 150 | { | 150 | { |
| 151 | struct link **active = &n_ptr->active_links[0]; | 151 | struct link **active = &n_ptr->active_links[0]; |
| 152 | 152 | ||
| @@ -180,7 +180,7 @@ void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) | |||
| 180 | * node_select_active_links - select active link | 180 | * node_select_active_links - select active link |
| 181 | */ | 181 | */ |
| 182 | 182 | ||
| 183 | static void node_select_active_links(struct node *n_ptr) | 183 | static void node_select_active_links(struct tipc_node *n_ptr) |
| 184 | { | 184 | { |
| 185 | struct link **active = &n_ptr->active_links[0]; | 185 | struct link **active = &n_ptr->active_links[0]; |
| 186 | u32 i; | 186 | u32 i; |
| @@ -208,7 +208,7 @@ static void node_select_active_links(struct node *n_ptr) | |||
| 208 | * tipc_node_link_down - handle loss of link | 208 | * tipc_node_link_down - handle loss of link |
| 209 | */ | 209 | */ |
| 210 | 210 | ||
| 211 | void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) | 211 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr) |
| 212 | { | 212 | { |
| 213 | struct link **active; | 213 | struct link **active; |
| 214 | 214 | ||
| @@ -235,30 +235,30 @@ void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) | |||
| 235 | node_lost_contact(n_ptr); | 235 | node_lost_contact(n_ptr); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | int tipc_node_has_active_links(struct node *n_ptr) | 238 | int tipc_node_has_active_links(struct tipc_node *n_ptr) |
| 239 | { | 239 | { |
| 240 | return (n_ptr && | 240 | return (n_ptr && |
| 241 | ((n_ptr->active_links[0]) || (n_ptr->active_links[1]))); | 241 | ((n_ptr->active_links[0]) || (n_ptr->active_links[1]))); |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | int tipc_node_has_redundant_links(struct node *n_ptr) | 244 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr) |
| 245 | { | 245 | { |
| 246 | return (n_ptr->working_links > 1); | 246 | return (n_ptr->working_links > 1); |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | static int tipc_node_has_active_routes(struct node *n_ptr) | 249 | static int tipc_node_has_active_routes(struct tipc_node *n_ptr) |
| 250 | { | 250 | { |
| 251 | return (n_ptr && (n_ptr->last_router >= 0)); | 251 | return (n_ptr && (n_ptr->last_router >= 0)); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | int tipc_node_is_up(struct node *n_ptr) | 254 | int tipc_node_is_up(struct tipc_node *n_ptr) |
| 255 | { | 255 | { |
| 256 | return (tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr)); | 256 | return (tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr)); |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | struct node *tipc_node_attach_link(struct link *l_ptr) | 259 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr) |
| 260 | { | 260 | { |
| 261 | struct node *n_ptr = tipc_node_find(l_ptr->addr); | 261 | struct tipc_node *n_ptr = tipc_node_find(l_ptr->addr); |
| 262 | 262 | ||
| 263 | if (!n_ptr) | 263 | if (!n_ptr) |
| 264 | n_ptr = tipc_node_create(l_ptr->addr); | 264 | n_ptr = tipc_node_create(l_ptr->addr); |
| @@ -285,7 +285,7 @@ struct node *tipc_node_attach_link(struct link *l_ptr) | |||
| 285 | return NULL; | 285 | return NULL; |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) | 288 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr) |
| 289 | { | 289 | { |
| 290 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; | 290 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; |
| 291 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; | 291 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; |
| @@ -338,7 +338,7 @@ void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) | |||
| 338 | * | 338 | * |
| 339 | */ | 339 | */ |
| 340 | 340 | ||
| 341 | static void node_established_contact(struct node *n_ptr) | 341 | static void node_established_contact(struct tipc_node *n_ptr) |
| 342 | { | 342 | { |
| 343 | struct cluster *c_ptr; | 343 | struct cluster *c_ptr; |
| 344 | 344 | ||
| @@ -384,10 +384,10 @@ static void node_established_contact(struct node *n_ptr) | |||
| 384 | tipc_highest_allowed_slave); | 384 | tipc_highest_allowed_slave); |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | static void node_lost_contact(struct node *n_ptr) | 387 | static void node_lost_contact(struct tipc_node *n_ptr) |
| 388 | { | 388 | { |
| 389 | struct cluster *c_ptr; | 389 | struct cluster *c_ptr; |
| 390 | struct node_subscr *ns, *tns; | 390 | struct tipc_node_subscr *ns, *tns; |
| 391 | char addr_string[16]; | 391 | char addr_string[16]; |
| 392 | u32 i; | 392 | u32 i; |
| 393 | 393 | ||
| @@ -466,9 +466,9 @@ static void node_lost_contact(struct node *n_ptr) | |||
| 466 | * Called by when cluster local lookup has failed. | 466 | * Called by when cluster local lookup has failed. |
| 467 | */ | 467 | */ |
| 468 | 468 | ||
| 469 | struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | 469 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector) |
| 470 | { | 470 | { |
| 471 | struct node *n_ptr; | 471 | struct tipc_node *n_ptr; |
| 472 | u32 router_addr; | 472 | u32 router_addr; |
| 473 | 473 | ||
| 474 | if (!tipc_addr_domain_valid(addr)) | 474 | if (!tipc_addr_domain_valid(addr)) |
| @@ -513,7 +513,7 @@ struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | |||
| 513 | * Uses a deterministic and fair algorithm for selecting router node. | 513 | * Uses a deterministic and fair algorithm for selecting router node. |
| 514 | */ | 514 | */ |
| 515 | 515 | ||
| 516 | u32 tipc_node_select_router(struct node *n_ptr, u32 ref) | 516 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref) |
| 517 | { | 517 | { |
| 518 | u32 ulim; | 518 | u32 ulim; |
| 519 | u32 mask; | 519 | u32 mask; |
| @@ -551,7 +551,7 @@ u32 tipc_node_select_router(struct node *n_ptr, u32 ref) | |||
| 551 | return tipc_addr(own_zone(), own_cluster(), r); | 551 | return tipc_addr(own_zone(), own_cluster(), r); |
| 552 | } | 552 | } |
| 553 | 553 | ||
| 554 | void tipc_node_add_router(struct node *n_ptr, u32 router) | 554 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router) |
| 555 | { | 555 | { |
| 556 | u32 r_num = tipc_node(router); | 556 | u32 r_num = tipc_node(router); |
| 557 | 557 | ||
| @@ -562,7 +562,7 @@ void tipc_node_add_router(struct node *n_ptr, u32 router) | |||
| 562 | !n_ptr->routers[n_ptr->last_router]); | 562 | !n_ptr->routers[n_ptr->last_router]); |
| 563 | } | 563 | } |
| 564 | 564 | ||
| 565 | void tipc_node_remove_router(struct node *n_ptr, u32 router) | 565 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router) |
| 566 | { | 566 | { |
| 567 | u32 r_num = tipc_node(router); | 567 | u32 r_num = tipc_node(router); |
| 568 | 568 | ||
| @@ -580,7 +580,7 @@ void tipc_node_remove_router(struct node *n_ptr, u32 router) | |||
| 580 | } | 580 | } |
| 581 | 581 | ||
| 582 | #if 0 | 582 | #if 0 |
| 583 | void node_print(struct print_buf *buf, struct node *n_ptr, char *str) | 583 | void node_print(struct print_buf *buf, struct tipc_node *n_ptr, char *str) |
| 584 | { | 584 | { |
| 585 | u32 i; | 585 | u32 i; |
| 586 | 586 | ||
| @@ -597,7 +597,7 @@ void node_print(struct print_buf *buf, struct node *n_ptr, char *str) | |||
| 597 | 597 | ||
| 598 | u32 tipc_available_nodes(const u32 domain) | 598 | u32 tipc_available_nodes(const u32 domain) |
| 599 | { | 599 | { |
| 600 | struct node *n_ptr; | 600 | struct tipc_node *n_ptr; |
| 601 | u32 cnt = 0; | 601 | u32 cnt = 0; |
| 602 | 602 | ||
| 603 | read_lock_bh(&tipc_net_lock); | 603 | read_lock_bh(&tipc_net_lock); |
| @@ -615,7 +615,7 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) | |||
| 615 | { | 615 | { |
| 616 | u32 domain; | 616 | u32 domain; |
| 617 | struct sk_buff *buf; | 617 | struct sk_buff *buf; |
| 618 | struct node *n_ptr; | 618 | struct tipc_node *n_ptr; |
| 619 | struct tipc_node_info node_info; | 619 | struct tipc_node_info node_info; |
| 620 | u32 payload_size; | 620 | u32 payload_size; |
| 621 | 621 | ||
| @@ -667,7 +667,7 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) | |||
| 667 | { | 667 | { |
| 668 | u32 domain; | 668 | u32 domain; |
| 669 | struct sk_buff *buf; | 669 | struct sk_buff *buf; |
| 670 | struct node *n_ptr; | 670 | struct tipc_node *n_ptr; |
| 671 | struct tipc_link_info link_info; | 671 | struct tipc_link_info link_info; |
| 672 | u32 payload_size; | 672 | u32 payload_size; |
| 673 | 673 | ||
diff --git a/net/tipc/node.h b/net/tipc/node.h index cd1882654bbb..6f990da5d143 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | #include "bearer.h" | 43 | #include "bearer.h" |
| 44 | 44 | ||
| 45 | /** | 45 | /** |
| 46 | * struct node - TIPC node structure | 46 | * struct tipc_node - TIPC node structure |
| 47 | * @addr: network address of node | 47 | * @addr: network address of node |
| 48 | * @lock: spinlock governing access to structure | 48 | * @lock: spinlock governing access to structure |
| 49 | * @owner: pointer to cluster that node belongs to | 49 | * @owner: pointer to cluster that node belongs to |
| @@ -68,11 +68,11 @@ | |||
| 68 | * @defragm: list of partially reassembled b'cast message fragments from node | 68 | * @defragm: list of partially reassembled b'cast message fragments from node |
| 69 | */ | 69 | */ |
| 70 | 70 | ||
| 71 | struct node { | 71 | struct tipc_node { |
| 72 | u32 addr; | 72 | u32 addr; |
| 73 | spinlock_t lock; | 73 | spinlock_t lock; |
| 74 | struct cluster *owner; | 74 | struct cluster *owner; |
| 75 | struct node *next; | 75 | struct tipc_node *next; |
| 76 | struct list_head nsub; | 76 | struct list_head nsub; |
| 77 | struct link *active_links[2]; | 77 | struct link *active_links[2]; |
| 78 | struct link *links[MAX_BEARERS]; | 78 | struct link *links[MAX_BEARERS]; |
| @@ -94,26 +94,26 @@ struct node { | |||
| 94 | } bclink; | 94 | } bclink; |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | extern struct node *tipc_nodes; | 97 | extern struct tipc_node *tipc_nodes; |
| 98 | extern u32 tipc_own_tag; | 98 | extern u32 tipc_own_tag; |
| 99 | 99 | ||
| 100 | struct node *tipc_node_create(u32 addr); | 100 | struct tipc_node *tipc_node_create(u32 addr); |
| 101 | void tipc_node_delete(struct node *n_ptr); | 101 | void tipc_node_delete(struct tipc_node *n_ptr); |
| 102 | struct node *tipc_node_attach_link(struct link *l_ptr); | 102 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr); |
| 103 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr); | 103 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr); |
| 104 | void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr); | 104 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr); |
| 105 | void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr); | 105 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); |
| 106 | int tipc_node_has_active_links(struct node *n_ptr); | 106 | int tipc_node_has_active_links(struct tipc_node *n_ptr); |
| 107 | int tipc_node_has_redundant_links(struct node *n_ptr); | 107 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr); |
| 108 | u32 tipc_node_select_router(struct node *n_ptr, u32 ref); | 108 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref); |
| 109 | struct node *tipc_node_select_next_hop(u32 addr, u32 selector); | 109 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector); |
| 110 | int tipc_node_is_up(struct node *n_ptr); | 110 | int tipc_node_is_up(struct tipc_node *n_ptr); |
| 111 | void tipc_node_add_router(struct node *n_ptr, u32 router); | 111 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router); |
| 112 | void tipc_node_remove_router(struct node *n_ptr, u32 router); | 112 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router); |
| 113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); | 113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); |
| 114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); | 114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); |
| 115 | 115 | ||
| 116 | static inline struct node *tipc_node_find(u32 addr) | 116 | static inline struct tipc_node *tipc_node_find(u32 addr) |
| 117 | { | 117 | { |
| 118 | if (likely(in_own_cluster(addr))) | 118 | if (likely(in_own_cluster(addr))) |
| 119 | return tipc_local_nodes[tipc_node(addr)]; | 119 | return tipc_local_nodes[tipc_node(addr)]; |
| @@ -126,19 +126,19 @@ static inline struct node *tipc_node_find(u32 addr) | |||
| 126 | return NULL; | 126 | return NULL; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static inline struct node *tipc_node_select(u32 addr, u32 selector) | 129 | static inline struct tipc_node *tipc_node_select(u32 addr, u32 selector) |
| 130 | { | 130 | { |
| 131 | if (likely(in_own_cluster(addr))) | 131 | if (likely(in_own_cluster(addr))) |
| 132 | return tipc_local_nodes[tipc_node(addr)]; | 132 | return tipc_local_nodes[tipc_node(addr)]; |
| 133 | return tipc_node_select_next_hop(addr, selector); | 133 | return tipc_node_select_next_hop(addr, selector); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | static inline void tipc_node_lock(struct node *n_ptr) | 136 | static inline void tipc_node_lock(struct tipc_node *n_ptr) |
| 137 | { | 137 | { |
| 138 | spin_lock_bh(&n_ptr->lock); | 138 | spin_lock_bh(&n_ptr->lock); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static inline void tipc_node_unlock(struct node *n_ptr) | 141 | static inline void tipc_node_unlock(struct tipc_node *n_ptr) |
| 142 | { | 142 | { |
| 143 | spin_unlock_bh(&n_ptr->lock); | 143 | spin_unlock_bh(&n_ptr->lock); |
| 144 | } | 144 | } |
diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index 8ecbd0fb6103..19194d476a9e 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | * tipc_nodesub_subscribe - create "node down" subscription for specified node | 44 | * tipc_nodesub_subscribe - create "node down" subscription for specified node |
| 45 | */ | 45 | */ |
| 46 | 46 | ||
| 47 | void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | 47 | void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, |
| 48 | void *usr_handle, net_ev_handler handle_down) | 48 | void *usr_handle, net_ev_handler handle_down) |
| 49 | { | 49 | { |
| 50 | if (addr == tipc_own_addr) { | 50 | if (addr == tipc_own_addr) { |
| @@ -69,7 +69,7 @@ void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | |||
| 69 | * tipc_nodesub_unsubscribe - cancel "node down" subscription (if any) | 69 | * tipc_nodesub_unsubscribe - cancel "node down" subscription (if any) |
| 70 | */ | 70 | */ |
| 71 | 71 | ||
| 72 | void tipc_nodesub_unsubscribe(struct node_subscr *node_sub) | 72 | void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub) |
| 73 | { | 73 | { |
| 74 | if (!node_sub->node) | 74 | if (!node_sub->node) |
| 75 | return; | 75 | return; |
diff --git a/net/tipc/node_subscr.h b/net/tipc/node_subscr.h index 5f3f5859b84c..006ed739f515 100644 --- a/net/tipc/node_subscr.h +++ b/net/tipc/node_subscr.h | |||
| @@ -42,22 +42,22 @@ | |||
| 42 | typedef void (*net_ev_handler) (void *usr_handle); | 42 | typedef void (*net_ev_handler) (void *usr_handle); |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | * struct node_subscr - "node down" subscription entry | 45 | * struct tipc_node_subscr - "node down" subscription entry |
| 46 | * @node: ptr to node structure of interest (or NULL, if none) | 46 | * @node: ptr to node structure of interest (or NULL, if none) |
| 47 | * @handle_node_down: routine to invoke when node fails | 47 | * @handle_node_down: routine to invoke when node fails |
| 48 | * @usr_handle: argument to pass to routine when node fails | 48 | * @usr_handle: argument to pass to routine when node fails |
| 49 | * @nodesub_list: adjacent entries in list of subscriptions for the node | 49 | * @nodesub_list: adjacent entries in list of subscriptions for the node |
| 50 | */ | 50 | */ |
| 51 | 51 | ||
| 52 | struct node_subscr { | 52 | struct tipc_node_subscr { |
| 53 | struct node *node; | 53 | struct tipc_node *node; |
| 54 | net_ev_handler handle_node_down; | 54 | net_ev_handler handle_node_down; |
| 55 | void *usr_handle; | 55 | void *usr_handle; |
| 56 | struct list_head nodesub_list; | 56 | struct list_head nodesub_list; |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | 59 | void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, |
| 60 | void *usr_handle, net_ev_handler handle_down); | 60 | void *usr_handle, net_ev_handler handle_down); |
| 61 | void tipc_nodesub_unsubscribe(struct node_subscr *node_sub); | 61 | void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub); |
| 62 | 62 | ||
| 63 | #endif | 63 | #endif |
diff --git a/net/tipc/port.h b/net/tipc/port.h index e5f8c16429bd..ff31ee4a1dc3 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h | |||
| @@ -105,7 +105,7 @@ struct port { | |||
| 105 | u32 probing_interval; | 105 | u32 probing_interval; |
| 106 | u32 last_in_seqno; | 106 | u32 last_in_seqno; |
| 107 | struct timer_list timer; | 107 | struct timer_list timer; |
| 108 | struct node_subscr subscription; | 108 | struct tipc_node_subscr subscription; |
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | extern spinlock_t tipc_port_list_lock; | 111 | extern spinlock_t tipc_port_list_lock; |
diff --git a/net/tipc/zone.c b/net/tipc/zone.c index 3506f8563441..2c01ba2d86bf 100644 --- a/net/tipc/zone.c +++ b/net/tipc/zone.c | |||
| @@ -111,10 +111,10 @@ void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest) | |||
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | struct node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) | 114 | struct tipc_node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) |
| 115 | { | 115 | { |
| 116 | struct cluster *c_ptr; | 116 | struct cluster *c_ptr; |
| 117 | struct node *n_ptr; | 117 | struct tipc_node *n_ptr; |
| 118 | u32 c_num; | 118 | u32 c_num; |
| 119 | 119 | ||
| 120 | if (!z_ptr) | 120 | if (!z_ptr) |
diff --git a/net/tipc/zone.h b/net/tipc/zone.h index 6e7a08df8af5..7bdc3406ba9b 100644 --- a/net/tipc/zone.h +++ b/net/tipc/zone.h | |||
| @@ -54,7 +54,7 @@ struct _zone { | |||
| 54 | u32 links; | 54 | u32 links; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | struct node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref); | 57 | struct tipc_node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref); |
| 58 | u32 tipc_zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref); | 58 | u32 tipc_zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref); |
| 59 | void tipc_zone_remove_as_router(struct _zone *z_ptr, u32 router); | 59 | void tipc_zone_remove_as_router(struct _zone *z_ptr, u32 router); |
| 60 | void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest); | 60 | void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest); |
