aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_fdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r--net/bridge/br_fdb.c17
1 files changed, 9 insertions, 8 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
468static int fdb_fill_info(struct sk_buff *skb, const struct net_bridge *br, 468static 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 */
611int br_fdb_add(struct ndmsg *ndm, struct net_device *dev, 611int 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
642static int fdb_delete_by_addr(struct net_bridge_port *p, u8 *addr) 643static 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 */
657int br_fdb_delete(struct ndmsg *ndm, struct net_device *dev, 658int 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;