aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bonding.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r--drivers/net/bonding/bonding.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 1aecc37e5b4d..9f2bae6616d3 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -21,6 +21,7 @@
21#include <linux/cpumask.h> 21#include <linux/cpumask.h>
22#include <linux/in6.h> 22#include <linux/in6.h>
23#include <linux/netpoll.h> 23#include <linux/netpoll.h>
24#include <linux/inetdevice.h>
24#include "bond_3ad.h" 25#include "bond_3ad.h"
25#include "bond_alb.h" 26#include "bond_alb.h"
26 27
@@ -166,7 +167,6 @@ struct bond_parm_tbl {
166 167
167struct vlan_entry { 168struct vlan_entry {
168 struct list_head vlan_list; 169 struct list_head vlan_list;
169 __be32 vlan_ip;
170 unsigned short vlan_id; 170 unsigned short vlan_id;
171}; 171};
172 172
@@ -232,7 +232,6 @@ struct bonding {
232 struct list_head bond_list; 232 struct list_head bond_list;
233 struct netdev_hw_addr_list mc_list; 233 struct netdev_hw_addr_list mc_list;
234 int (*xmit_hash_policy)(struct sk_buff *, int); 234 int (*xmit_hash_policy)(struct sk_buff *, int);
235 __be32 master_ip;
236 u16 rr_tx_counter; 235 u16 rr_tx_counter;
237 struct ad_bond_info ad_info; 236 struct ad_bond_info ad_info;
238 struct alb_bond_info alb_info; 237 struct alb_bond_info alb_info;
@@ -378,6 +377,21 @@ static inline bool bond_is_slave_inactive(struct slave *slave)
378 return slave->inactive; 377 return slave->inactive;
379} 378}
380 379
380static inline __be32 bond_confirm_addr(struct net_device *dev, __be32 dst, __be32 local)
381{
382 struct in_device *in_dev;
383 __be32 addr = 0;
384
385 rcu_read_lock();
386 in_dev = __in_dev_get_rcu(dev);
387
388 if (in_dev)
389 addr = inet_confirm_addr(in_dev, dst, local, RT_SCOPE_HOST);
390
391 rcu_read_unlock();
392 return addr;
393}
394
381struct bond_net; 395struct bond_net;
382 396
383struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); 397struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);