diff options
-rw-r--r-- | include/net/neighbour.h | 5 | ||||
-rw-r--r-- | net/802/hippi.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 4c09bd23b832..7277caf3743d 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -92,6 +92,11 @@ static inline void neigh_var_set(struct neigh_parms *p, int index, int val) | |||
92 | } | 92 | } |
93 | 93 | ||
94 | #define NEIGH_VAR(p, attr) ((p)->data[NEIGH_VAR_ ## attr]) | 94 | #define NEIGH_VAR(p, attr) ((p)->data[NEIGH_VAR_ ## attr]) |
95 | |||
96 | /* In ndo_neigh_setup, NEIGH_VAR_INIT should be used. | ||
97 | * In other cases, NEIGH_VAR_SET should be used. | ||
98 | */ | ||
99 | #define NEIGH_VAR_INIT(p, attr, val) (NEIGH_VAR(p, attr) = val) | ||
95 | #define NEIGH_VAR_SET(p, attr, val) neigh_var_set(p, NEIGH_VAR_ ## attr, val) | 100 | #define NEIGH_VAR_SET(p, attr, val) neigh_var_set(p, NEIGH_VAR_ ## attr, val) |
96 | 101 | ||
97 | static inline void neigh_parms_data_state_setall(struct neigh_parms *p) | 102 | static inline void neigh_parms_data_state_setall(struct neigh_parms *p) |
diff --git a/net/802/hippi.c b/net/802/hippi.c index a97a3bde77bb..5ff2a718ddca 100644 --- a/net/802/hippi.c +++ b/net/802/hippi.c | |||
@@ -172,14 +172,14 @@ EXPORT_SYMBOL(hippi_mac_addr); | |||
172 | int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p) | 172 | int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p) |
173 | { | 173 | { |
174 | /* Never send broadcast/multicast ARP messages */ | 174 | /* Never send broadcast/multicast ARP messages */ |
175 | NEIGH_VAR_SET(p, MCAST_PROBES, 0); | 175 | NEIGH_VAR_INIT(p, MCAST_PROBES, 0); |
176 | 176 | ||
177 | /* In IPv6 unicast probes are valid even on NBMA, | 177 | /* In IPv6 unicast probes are valid even on NBMA, |
178 | * because they are encapsulated in normal IPv6 protocol. | 178 | * because they are encapsulated in normal IPv6 protocol. |
179 | * Should be a generic flag. | 179 | * Should be a generic flag. |
180 | */ | 180 | */ |
181 | if (p->tbl->family != AF_INET6) | 181 | if (p->tbl->family != AF_INET6) |
182 | NEIGH_VAR_SET(p, UCAST_PROBES, 0); | 182 | NEIGH_VAR_INIT(p, UCAST_PROBES, 0); |
183 | return 0; | 183 | return 0; |
184 | } | 184 | } |
185 | EXPORT_SYMBOL(hippi_neigh_setup_dev); | 185 | EXPORT_SYMBOL(hippi_neigh_setup_dev); |