diff options
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_fdb.c | 17 | ||||
-rw-r--r-- | net/bridge/br_netlink.c | 2 | ||||
-rw-r--r-- | net/bridge/br_private.h | 6 | ||||
-rw-r--r-- | net/bridge/br_stp_timer.c | 2 | ||||
-rw-r--r-- | net/bridge/netfilter/ebt_ulog.c | 3 | ||||
-rw-r--r-- | net/bridge/netfilter/ebtable_filter.c | 4 | ||||
-rw-r--r-- | net/bridge/netfilter/ebtable_nat.c | 4 |
7 files changed, 17 insertions, 21 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index d21f32383517..d9576e6de2b8 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -312,7 +312,7 @@ int br_fdb_fillbuf(struct net_bridge *br, void *buf, | |||
312 | 312 | ||
313 | fe->is_local = f->is_local; | 313 | fe->is_local = f->is_local; |
314 | if (!f->is_static) | 314 | if (!f->is_static) |
315 | fe->ageing_timer_value = jiffies_to_clock_t(jiffies - f->updated); | 315 | fe->ageing_timer_value = jiffies_delta_to_clock_t(jiffies - f->updated); |
316 | ++fe; | 316 | ++fe; |
317 | ++num; | 317 | ++num; |
318 | } | 318 | } |
@@ -467,14 +467,14 @@ static int fdb_to_nud(const struct net_bridge_fdb_entry *fdb) | |||
467 | 467 | ||
468 | static int fdb_fill_info(struct sk_buff *skb, const struct net_bridge *br, | 468 | static int fdb_fill_info(struct sk_buff *skb, const struct net_bridge *br, |
469 | const struct net_bridge_fdb_entry *fdb, | 469 | const struct net_bridge_fdb_entry *fdb, |
470 | u32 pid, u32 seq, int type, unsigned int flags) | 470 | u32 portid, u32 seq, int type, unsigned int flags) |
471 | { | 471 | { |
472 | unsigned long now = jiffies; | 472 | unsigned long now = jiffies; |
473 | struct nda_cacheinfo ci; | 473 | struct nda_cacheinfo ci; |
474 | struct nlmsghdr *nlh; | 474 | struct nlmsghdr *nlh; |
475 | struct ndmsg *ndm; | 475 | struct ndmsg *ndm; |
476 | 476 | ||
477 | nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ndm), flags); | 477 | nlh = nlmsg_put(skb, portid, seq, type, sizeof(*ndm), flags); |
478 | if (nlh == NULL) | 478 | if (nlh == NULL) |
479 | return -EMSGSIZE; | 479 | return -EMSGSIZE; |
480 | 480 | ||
@@ -555,7 +555,7 @@ int br_fdb_dump(struct sk_buff *skb, | |||
555 | goto skip; | 555 | goto skip; |
556 | 556 | ||
557 | if (fdb_fill_info(skb, br, f, | 557 | if (fdb_fill_info(skb, br, f, |
558 | NETLINK_CB(cb->skb).pid, | 558 | NETLINK_CB(cb->skb).portid, |
559 | cb->nlh->nlmsg_seq, | 559 | cb->nlh->nlmsg_seq, |
560 | RTM_NEWNEIGH, | 560 | RTM_NEWNEIGH, |
561 | NLM_F_MULTI) < 0) | 561 | NLM_F_MULTI) < 0) |
@@ -608,8 +608,9 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr, | |||
608 | } | 608 | } |
609 | 609 | ||
610 | /* Add new permanent fdb entry with RTM_NEWNEIGH */ | 610 | /* Add new permanent fdb entry with RTM_NEWNEIGH */ |
611 | int br_fdb_add(struct ndmsg *ndm, struct net_device *dev, | 611 | int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], |
612 | unsigned char *addr, u16 nlh_flags) | 612 | struct net_device *dev, |
613 | const unsigned char *addr, u16 nlh_flags) | ||
613 | { | 614 | { |
614 | struct net_bridge_port *p; | 615 | struct net_bridge_port *p; |
615 | int err = 0; | 616 | int err = 0; |
@@ -639,7 +640,7 @@ int br_fdb_add(struct ndmsg *ndm, struct net_device *dev, | |||
639 | return err; | 640 | return err; |
640 | } | 641 | } |
641 | 642 | ||
642 | static int fdb_delete_by_addr(struct net_bridge_port *p, u8 *addr) | 643 | static int fdb_delete_by_addr(struct net_bridge_port *p, const u8 *addr) |
643 | { | 644 | { |
644 | struct net_bridge *br = p->br; | 645 | struct net_bridge *br = p->br; |
645 | struct hlist_head *head = &br->hash[br_mac_hash(addr)]; | 646 | struct hlist_head *head = &br->hash[br_mac_hash(addr)]; |
@@ -655,7 +656,7 @@ static int fdb_delete_by_addr(struct net_bridge_port *p, u8 *addr) | |||
655 | 656 | ||
656 | /* Remove neighbor entry with RTM_DELNEIGH */ | 657 | /* Remove neighbor entry with RTM_DELNEIGH */ |
657 | int br_fdb_delete(struct ndmsg *ndm, struct net_device *dev, | 658 | int br_fdb_delete(struct ndmsg *ndm, struct net_device *dev, |
658 | unsigned char *addr) | 659 | const unsigned char *addr) |
659 | { | 660 | { |
660 | struct net_bridge_port *p; | 661 | struct net_bridge_port *p; |
661 | int err; | 662 | int err; |
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index fe41260fbf38..093f527276a3 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -127,7 +127,7 @@ static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) | |||
127 | goto skip; | 127 | goto skip; |
128 | 128 | ||
129 | if (br_fill_ifinfo(skb, port, | 129 | if (br_fill_ifinfo(skb, port, |
130 | NETLINK_CB(cb->skb).pid, | 130 | NETLINK_CB(cb->skb).portid, |
131 | cb->nlh->nlmsg_seq, RTM_NEWLINK, | 131 | cb->nlh->nlmsg_seq, RTM_NEWLINK, |
132 | NLM_F_MULTI) < 0) | 132 | NLM_F_MULTI) < 0) |
133 | break; | 133 | break; |
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index f507d2af9646..9b278c4ebee1 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -363,10 +363,10 @@ extern void br_fdb_update(struct net_bridge *br, | |||
363 | 363 | ||
364 | extern int br_fdb_delete(struct ndmsg *ndm, | 364 | extern int br_fdb_delete(struct ndmsg *ndm, |
365 | struct net_device *dev, | 365 | struct net_device *dev, |
366 | unsigned char *addr); | 366 | const unsigned char *addr); |
367 | extern int br_fdb_add(struct ndmsg *nlh, | 367 | extern int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[], |
368 | struct net_device *dev, | 368 | struct net_device *dev, |
369 | unsigned char *addr, | 369 | const unsigned char *addr, |
370 | u16 nlh_flags); | 370 | u16 nlh_flags); |
371 | extern int br_fdb_dump(struct sk_buff *skb, | 371 | extern int br_fdb_dump(struct sk_buff *skb, |
372 | struct netlink_callback *cb, | 372 | struct netlink_callback *cb, |
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c index a6747e673426..c3530a81a33b 100644 --- a/net/bridge/br_stp_timer.c +++ b/net/bridge/br_stp_timer.c | |||
@@ -170,5 +170,5 @@ void br_stp_port_timer_init(struct net_bridge_port *p) | |||
170 | unsigned long br_timer_value(const struct timer_list *timer) | 170 | unsigned long br_timer_value(const struct timer_list *timer) |
171 | { | 171 | { |
172 | return timer_pending(timer) | 172 | return timer_pending(timer) |
173 | ? jiffies_to_clock_t(timer->expires - jiffies) : 0; | 173 | ? jiffies_delta_to_clock_t(timer->expires - jiffies) : 0; |
174 | } | 174 | } |
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index 19063473c71f..3476ec469740 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c | |||
@@ -298,8 +298,7 @@ static int __init ebt_ulog_init(void) | |||
298 | spin_lock_init(&ulog_buffers[i].lock); | 298 | spin_lock_init(&ulog_buffers[i].lock); |
299 | } | 299 | } |
300 | 300 | ||
301 | ebtulognl = netlink_kernel_create(&init_net, NETLINK_NFLOG, | 301 | ebtulognl = netlink_kernel_create(&init_net, NETLINK_NFLOG, &cfg); |
302 | THIS_MODULE, &cfg); | ||
303 | if (!ebtulognl) | 302 | if (!ebtulognl) |
304 | ret = -ENOMEM; | 303 | ret = -ENOMEM; |
305 | else if ((ret = xt_register_target(&ebt_ulog_tg_reg)) != 0) | 304 | else if ((ret = xt_register_target(&ebt_ulog_tg_reg)) != 0) |
diff --git a/net/bridge/netfilter/ebtable_filter.c b/net/bridge/netfilter/ebtable_filter.c index 42e6bd094574..3c2e9dced9e0 100644 --- a/net/bridge/netfilter/ebtable_filter.c +++ b/net/bridge/netfilter/ebtable_filter.c | |||
@@ -100,9 +100,7 @@ static struct nf_hook_ops ebt_ops_filter[] __read_mostly = { | |||
100 | static int __net_init frame_filter_net_init(struct net *net) | 100 | static int __net_init frame_filter_net_init(struct net *net) |
101 | { | 101 | { |
102 | net->xt.frame_filter = ebt_register_table(net, &frame_filter); | 102 | net->xt.frame_filter = ebt_register_table(net, &frame_filter); |
103 | if (IS_ERR(net->xt.frame_filter)) | 103 | return PTR_RET(net->xt.frame_filter); |
104 | return PTR_ERR(net->xt.frame_filter); | ||
105 | return 0; | ||
106 | } | 104 | } |
107 | 105 | ||
108 | static void __net_exit frame_filter_net_exit(struct net *net) | 106 | static void __net_exit frame_filter_net_exit(struct net *net) |
diff --git a/net/bridge/netfilter/ebtable_nat.c b/net/bridge/netfilter/ebtable_nat.c index 6dc2f878ae05..10871bc77908 100644 --- a/net/bridge/netfilter/ebtable_nat.c +++ b/net/bridge/netfilter/ebtable_nat.c | |||
@@ -100,9 +100,7 @@ static struct nf_hook_ops ebt_ops_nat[] __read_mostly = { | |||
100 | static int __net_init frame_nat_net_init(struct net *net) | 100 | static int __net_init frame_nat_net_init(struct net *net) |
101 | { | 101 | { |
102 | net->xt.frame_nat = ebt_register_table(net, &frame_nat); | 102 | net->xt.frame_nat = ebt_register_table(net, &frame_nat); |
103 | if (IS_ERR(net->xt.frame_nat)) | 103 | return PTR_RET(net->xt.frame_nat); |
104 | return PTR_ERR(net->xt.frame_nat); | ||
105 | return 0; | ||
106 | } | 104 | } |
107 | 105 | ||
108 | static void __net_exit frame_nat_net_exit(struct net *net) | 106 | static void __net_exit frame_nat_net_exit(struct net *net) |