diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/arp.h | 2 | ||||
-rw-r--r-- | include/net/ax25.h | 10 | ||||
-rw-r--r-- | include/net/compat.h | 3 | ||||
-rw-r--r-- | include/net/ieee80211.h | 15 | ||||
-rw-r--r-- | include/net/ieee80211softmac.h | 51 | ||||
-rw-r--r-- | include/net/ieee80211softmac_wx.h | 5 | ||||
-rw-r--r-- | include/net/inet6_hashtables.h | 70 | ||||
-rw-r--r-- | include/net/inet_timewait_sock.h | 2 | ||||
-rw-r--r-- | include/net/ip.h | 1 | ||||
-rw-r--r-- | include/net/ipv6.h | 2 | ||||
-rw-r--r-- | include/net/irda/irlmp.h | 2 | ||||
-rw-r--r-- | include/net/neighbour.h | 1 | ||||
-rw-r--r-- | include/net/netrom.h | 8 | ||||
-rw-r--r-- | include/net/rose.h | 14 | ||||
-rw-r--r-- | include/net/sctp/command.h | 1 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 6 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 1 | ||||
-rw-r--r-- | include/net/sock.h | 3 | ||||
-rw-r--r-- | include/net/x25device.h | 1 | ||||
-rw-r--r-- | include/net/xfrm.h | 8 |
20 files changed, 100 insertions, 106 deletions
diff --git a/include/net/arp.h b/include/net/arp.h index a13e30c35f42..643bded9f557 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
@@ -10,8 +10,6 @@ | |||
10 | extern struct neigh_table arp_tbl; | 10 | extern struct neigh_table arp_tbl; |
11 | 11 | ||
12 | extern void arp_init(void); | 12 | extern void arp_init(void); |
13 | extern int arp_rcv(struct sk_buff *skb, struct net_device *dev, | ||
14 | struct packet_type *pt, struct net_device *orig_dev); | ||
15 | extern int arp_find(unsigned char *haddr, struct sk_buff *skb); | 13 | extern int arp_find(unsigned char *haddr, struct sk_buff *skb); |
16 | extern int arp_ioctl(unsigned int cmd, void __user *arg); | 14 | extern int arp_ioctl(unsigned int cmd, void __user *arg); |
17 | extern void arp_send(int type, int ptype, u32 dest_ip, | 15 | extern void arp_send(int type, int ptype, u32 dest_ip, |
diff --git a/include/net/ax25.h b/include/net/ax25.h index d052b221dbcd..5bd997487054 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -145,14 +145,14 @@ enum { | |||
145 | #define AX25_DEF_CONMODE 2 /* Connected mode allowed */ | 145 | #define AX25_DEF_CONMODE 2 /* Connected mode allowed */ |
146 | #define AX25_DEF_WINDOW 2 /* Window=2 */ | 146 | #define AX25_DEF_WINDOW 2 /* Window=2 */ |
147 | #define AX25_DEF_EWINDOW 32 /* Module-128 Window=32 */ | 147 | #define AX25_DEF_EWINDOW 32 /* Module-128 Window=32 */ |
148 | #define AX25_DEF_T1 (10 * HZ) /* T1=10s */ | 148 | #define AX25_DEF_T1 10000 /* T1=10s */ |
149 | #define AX25_DEF_T2 (3 * HZ) /* T2=3s */ | 149 | #define AX25_DEF_T2 3000 /* T2=3s */ |
150 | #define AX25_DEF_T3 (300 * HZ) /* T3=300s */ | 150 | #define AX25_DEF_T3 300000 /* T3=300s */ |
151 | #define AX25_DEF_N2 10 /* N2=10 */ | 151 | #define AX25_DEF_N2 10 /* N2=10 */ |
152 | #define AX25_DEF_IDLE (0 * 60 * HZ) /* Idle=None */ | 152 | #define AX25_DEF_IDLE 0 /* Idle=None */ |
153 | #define AX25_DEF_PACLEN 256 /* Paclen=256 */ | 153 | #define AX25_DEF_PACLEN 256 /* Paclen=256 */ |
154 | #define AX25_DEF_PROTOCOL AX25_PROTO_STD_SIMPLEX /* Standard AX.25 */ | 154 | #define AX25_DEF_PROTOCOL AX25_PROTO_STD_SIMPLEX /* Standard AX.25 */ |
155 | #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ | 155 | #define AX25_DEF_DS_TIMEOUT 180000 /* DAMA timeout 3 minutes */ |
156 | 156 | ||
157 | typedef struct ax25_uid_assoc { | 157 | typedef struct ax25_uid_assoc { |
158 | struct hlist_node uid_node; | 158 | struct hlist_node uid_node; |
diff --git a/include/net/compat.h b/include/net/compat.h index 8662b8f43df5..e65cbedb6abc 100644 --- a/include/net/compat.h +++ b/include/net/compat.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | struct sock; | ||
7 | |||
6 | #if defined(CONFIG_COMPAT) | 8 | #if defined(CONFIG_COMPAT) |
7 | 9 | ||
8 | #include <linux/compat.h> | 10 | #include <linux/compat.h> |
@@ -23,7 +25,6 @@ struct compat_cmsghdr { | |||
23 | compat_int_t cmsg_type; | 25 | compat_int_t cmsg_type; |
24 | }; | 26 | }; |
25 | 27 | ||
26 | struct sock; | ||
27 | extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); | 28 | extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); |
28 | 29 | ||
29 | #else /* defined(CONFIG_COMPAT) */ | 30 | #else /* defined(CONFIG_COMPAT) */ |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 4725ff861c57..d5147770ad47 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/kernel.h> /* ARRAY_SIZE */ | 29 | #include <linux/kernel.h> /* ARRAY_SIZE */ |
30 | #include <linux/wireless.h> | 30 | #include <linux/wireless.h> |
31 | 31 | ||
32 | #define IEEE80211_VERSION "git-1.1.7" | 32 | #define IEEE80211_VERSION "git-1.1.13" |
33 | 33 | ||
34 | #define IEEE80211_DATA_LEN 2304 | 34 | #define IEEE80211_DATA_LEN 2304 |
35 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section | 35 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section |
@@ -104,6 +104,9 @@ | |||
104 | #define IEEE80211_SCTL_FRAG 0x000F | 104 | #define IEEE80211_SCTL_FRAG 0x000F |
105 | #define IEEE80211_SCTL_SEQ 0xFFF0 | 105 | #define IEEE80211_SCTL_SEQ 0xFFF0 |
106 | 106 | ||
107 | /* QOS control */ | ||
108 | #define IEEE80211_QCTL_TID 0x000F | ||
109 | |||
107 | /* debug macros */ | 110 | /* debug macros */ |
108 | 111 | ||
109 | #ifdef CONFIG_IEEE80211_DEBUG | 112 | #ifdef CONFIG_IEEE80211_DEBUG |
@@ -955,11 +958,13 @@ enum ieee80211_state { | |||
955 | 958 | ||
956 | #define IEEE80211_24GHZ_MIN_CHANNEL 1 | 959 | #define IEEE80211_24GHZ_MIN_CHANNEL 1 |
957 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 | 960 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 |
958 | #define IEEE80211_24GHZ_CHANNELS 14 | 961 | #define IEEE80211_24GHZ_CHANNELS (IEEE80211_24GHZ_MAX_CHANNEL - \ |
962 | IEEE80211_24GHZ_MIN_CHANNEL + 1) | ||
959 | 963 | ||
960 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 | 964 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 |
961 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 | 965 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 |
962 | #define IEEE80211_52GHZ_CHANNELS 131 | 966 | #define IEEE80211_52GHZ_CHANNELS (IEEE80211_52GHZ_MAX_CHANNEL - \ |
967 | IEEE80211_52GHZ_MIN_CHANNEL + 1) | ||
963 | 968 | ||
964 | enum { | 969 | enum { |
965 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), | 970 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), |
@@ -1073,6 +1078,7 @@ struct ieee80211_device { | |||
1073 | 1078 | ||
1074 | int (*handle_management) (struct net_device * dev, | 1079 | int (*handle_management) (struct net_device * dev, |
1075 | struct ieee80211_network * network, u16 type); | 1080 | struct ieee80211_network * network, u16 type); |
1081 | int (*is_qos_active) (struct net_device *dev, struct sk_buff *skb); | ||
1076 | 1082 | ||
1077 | /* Typical STA methods */ | 1083 | /* Typical STA methods */ |
1078 | int (*handle_auth) (struct net_device * dev, | 1084 | int (*handle_auth) (struct net_device * dev, |
@@ -1241,7 +1247,8 @@ extern int ieee80211_set_encryption(struct ieee80211_device *ieee); | |||
1241 | extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); | 1247 | extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); |
1242 | extern void ieee80211_txb_free(struct ieee80211_txb *); | 1248 | extern void ieee80211_txb_free(struct ieee80211_txb *); |
1243 | extern int ieee80211_tx_frame(struct ieee80211_device *ieee, | 1249 | extern int ieee80211_tx_frame(struct ieee80211_device *ieee, |
1244 | struct ieee80211_hdr *frame, int len); | 1250 | struct ieee80211_hdr *frame, int hdr_len, |
1251 | int total_len, int encrypt_mpdu); | ||
1245 | 1252 | ||
1246 | /* ieee80211_rx.c */ | 1253 | /* ieee80211_rx.c */ |
1247 | extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | 1254 | extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, |
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h index b971d8c82bdd..7a483ab4022f 100644 --- a/include/net/ieee80211softmac.h +++ b/include/net/ieee80211softmac.h | |||
@@ -86,6 +86,9 @@ struct ieee80211softmac_assoc_info { | |||
86 | 86 | ||
87 | /* BSSID we're trying to associate to */ | 87 | /* BSSID we're trying to associate to */ |
88 | char bssid[ETH_ALEN]; | 88 | char bssid[ETH_ALEN]; |
89 | |||
90 | /* Rates supported by the network */ | ||
91 | struct ieee80211softmac_ratesinfo supported_rates; | ||
89 | 92 | ||
90 | /* some flags. | 93 | /* some flags. |
91 | * static_essid is valid if the essid is constant, | 94 | * static_essid is valid if the essid is constant, |
@@ -96,10 +99,13 @@ struct ieee80211softmac_assoc_info { | |||
96 | * | 99 | * |
97 | * bssvalid is true if we found a matching network | 100 | * bssvalid is true if we found a matching network |
98 | * and saved it's BSSID into the bssid above. | 101 | * and saved it's BSSID into the bssid above. |
102 | * | ||
103 | * bssfixed is used for SIOCSIWAP. | ||
99 | */ | 104 | */ |
100 | u8 static_essid:1, | 105 | u8 static_essid:1, |
101 | associating:1, | 106 | associating:1, |
102 | bssvalid:1; | 107 | bssvalid:1, |
108 | bssfixed:1; | ||
103 | 109 | ||
104 | /* Scan retries remaining */ | 110 | /* Scan retries remaining */ |
105 | int scan_retry; | 111 | int scan_retry; |
@@ -129,23 +135,26 @@ enum { | |||
129 | struct ieee80211softmac_txrates { | 135 | struct ieee80211softmac_txrates { |
130 | /* The Bit-Rate to be used for multicast frames. */ | 136 | /* The Bit-Rate to be used for multicast frames. */ |
131 | u8 mcast_rate; | 137 | u8 mcast_rate; |
132 | /* The Bit-Rate to be used for multicast fallback | 138 | |
133 | * (If the device supports fallback and hardware-retry) | 139 | /* The Bit-Rate to be used for multicast management frames. */ |
134 | */ | 140 | u8 mgt_mcast_rate; |
135 | u8 mcast_fallback; | 141 | |
136 | /* The Bit-Rate to be used for any other (normal) data packet. */ | 142 | /* The Bit-Rate to be used for any other (normal) data packet. */ |
137 | u8 default_rate; | 143 | u8 default_rate; |
138 | /* The Bit-Rate to be used for default fallback | 144 | /* The Bit-Rate to be used for default fallback |
139 | * (If the device supports fallback and hardware-retry) | 145 | * (If the device supports fallback and hardware-retry) |
140 | */ | 146 | */ |
141 | u8 default_fallback; | 147 | u8 default_fallback; |
148 | |||
149 | /* This is the rate that the user asked for */ | ||
150 | u8 user_rate; | ||
142 | }; | 151 | }; |
143 | 152 | ||
144 | /* Bits for txrates_change callback. */ | 153 | /* Bits for txrates_change callback. */ |
145 | #define IEEE80211SOFTMAC_TXRATECHG_DEFAULT (1 << 0) /* default_rate */ | 154 | #define IEEE80211SOFTMAC_TXRATECHG_DEFAULT (1 << 0) /* default_rate */ |
146 | #define IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK (1 << 1) /* default_fallback */ | 155 | #define IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK (1 << 1) /* default_fallback */ |
147 | #define IEEE80211SOFTMAC_TXRATECHG_MCAST (1 << 2) /* mcast_rate */ | 156 | #define IEEE80211SOFTMAC_TXRATECHG_MCAST (1 << 2) /* mcast_rate */ |
148 | #define IEEE80211SOFTMAC_TXRATECHG_MCAST_FBACK (1 << 3) /* mcast_fallback */ | 157 | #define IEEE80211SOFTMAC_TXRATECHG_MGT_MCAST (1 << 3) /* mgt_mcast_rate */ |
149 | 158 | ||
150 | struct ieee80211softmac_device { | 159 | struct ieee80211softmac_device { |
151 | /* 802.11 structure for data stuff */ | 160 | /* 802.11 structure for data stuff */ |
@@ -201,7 +210,8 @@ struct ieee80211softmac_device { | |||
201 | 210 | ||
202 | /* couple of flags */ | 211 | /* couple of flags */ |
203 | u8 scanning:1, /* protects scanning from being done multiple times at once */ | 212 | u8 scanning:1, /* protects scanning from being done multiple times at once */ |
204 | associated:1; | 213 | associated:1, |
214 | running:1; | ||
205 | 215 | ||
206 | struct ieee80211softmac_scaninfo *scaninfo; | 216 | struct ieee80211softmac_scaninfo *scaninfo; |
207 | struct ieee80211softmac_assoc_info associnfo; | 217 | struct ieee80211softmac_assoc_info associnfo; |
@@ -246,6 +256,28 @@ extern void ieee80211softmac_fragment_lost(struct net_device *dev, | |||
246 | * Note that the rates need to be sorted. */ | 256 | * Note that the rates need to be sorted. */ |
247 | extern void ieee80211softmac_set_rates(struct net_device *dev, u8 count, u8 *rates); | 257 | extern void ieee80211softmac_set_rates(struct net_device *dev, u8 count, u8 *rates); |
248 | 258 | ||
259 | /* Helper function which advises you the rate at which a frame should be | ||
260 | * transmitted at. */ | ||
261 | static inline u8 ieee80211softmac_suggest_txrate(struct ieee80211softmac_device *mac, | ||
262 | int is_multicast, | ||
263 | int is_mgt) | ||
264 | { | ||
265 | struct ieee80211softmac_txrates *txrates = &mac->txrates; | ||
266 | |||
267 | if (!mac->associated) | ||
268 | return txrates->mgt_mcast_rate; | ||
269 | |||
270 | /* We are associated, sending unicast frame */ | ||
271 | if (!is_multicast) | ||
272 | return txrates->default_rate; | ||
273 | |||
274 | /* We are associated, sending multicast frame */ | ||
275 | if (is_mgt) | ||
276 | return txrates->mgt_mcast_rate; | ||
277 | else | ||
278 | return txrates->mcast_rate; | ||
279 | } | ||
280 | |||
249 | /* Start the SoftMAC. Call this after you initialized the device | 281 | /* Start the SoftMAC. Call this after you initialized the device |
250 | * and it is ready to run. | 282 | * and it is ready to run. |
251 | */ | 283 | */ |
@@ -267,8 +299,9 @@ extern void ieee80211softmac_stop(struct net_device *dev); | |||
267 | #define IEEE80211SOFTMAC_EVENT_AUTH_FAILED 5 | 299 | #define IEEE80211SOFTMAC_EVENT_AUTH_FAILED 5 |
268 | #define IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT 6 | 300 | #define IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT 6 |
269 | #define IEEE80211SOFTMAC_EVENT_ASSOCIATE_NET_NOT_FOUND 7 | 301 | #define IEEE80211SOFTMAC_EVENT_ASSOCIATE_NET_NOT_FOUND 7 |
302 | #define IEEE80211SOFTMAC_EVENT_DISASSOCIATED 8 | ||
270 | /* keep this updated! */ | 303 | /* keep this updated! */ |
271 | #define IEEE80211SOFTMAC_EVENT_LAST 7 | 304 | #define IEEE80211SOFTMAC_EVENT_LAST 8 |
272 | /* | 305 | /* |
273 | * If you want to be notified of certain events, you can call | 306 | * If you want to be notified of certain events, you can call |
274 | * ieee80211softmac_notify[_atomic] with | 307 | * ieee80211softmac_notify[_atomic] with |
@@ -277,7 +310,7 @@ extern void ieee80211softmac_stop(struct net_device *dev); | |||
277 | * - context set to the context data you want passed | 310 | * - context set to the context data you want passed |
278 | * The return value is 0, or an error. | 311 | * The return value is 0, or an error. |
279 | */ | 312 | */ |
280 | typedef void (*notify_function_ptr)(struct net_device *dev, void *context); | 313 | typedef void (*notify_function_ptr)(struct net_device *dev, int event_type, void *context); |
281 | 314 | ||
282 | #define ieee80211softmac_notify(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_KERNEL); | 315 | #define ieee80211softmac_notify(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_KERNEL); |
283 | #define ieee80211softmac_notify_atomic(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_ATOMIC); | 316 | #define ieee80211softmac_notify_atomic(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_ATOMIC); |
diff --git a/include/net/ieee80211softmac_wx.h b/include/net/ieee80211softmac_wx.h index 3e0be453ecea..4ee3ad57283f 100644 --- a/include/net/ieee80211softmac_wx.h +++ b/include/net/ieee80211softmac_wx.h | |||
@@ -91,4 +91,9 @@ ieee80211softmac_wx_get_genie(struct net_device *dev, | |||
91 | struct iw_request_info *info, | 91 | struct iw_request_info *info, |
92 | union iwreq_data *wrqu, | 92 | union iwreq_data *wrqu, |
93 | char *extra); | 93 | char *extra); |
94 | extern int | ||
95 | ieee80211softmac_wx_set_mlme(struct net_device *dev, | ||
96 | struct iw_request_info *info, | ||
97 | union iwreq_data *wrqu, | ||
98 | char *extra); | ||
94 | #endif /* _IEEE80211SOFTMAC_WX */ | 99 | #endif /* _IEEE80211SOFTMAC_WX */ |
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 25f708ff020e..59f0c83d55a2 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -48,31 +48,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) | |||
48 | return inet6_ehashfn(laddr, lport, faddr, fport); | 48 | return inet6_ehashfn(laddr, lport, faddr, fport); |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline void __inet6_hash(struct inet_hashinfo *hashinfo, | 51 | extern void __inet6_hash(struct inet_hashinfo *hashinfo, struct sock *sk); |
52 | struct sock *sk) | ||
53 | { | ||
54 | struct hlist_head *list; | ||
55 | rwlock_t *lock; | ||
56 | |||
57 | BUG_TRAP(sk_unhashed(sk)); | ||
58 | |||
59 | if (sk->sk_state == TCP_LISTEN) { | ||
60 | list = &hashinfo->listening_hash[inet_sk_listen_hashfn(sk)]; | ||
61 | lock = &hashinfo->lhash_lock; | ||
62 | inet_listen_wlock(hashinfo); | ||
63 | } else { | ||
64 | unsigned int hash; | ||
65 | sk->sk_hash = hash = inet6_sk_ehashfn(sk); | ||
66 | hash &= (hashinfo->ehash_size - 1); | ||
67 | list = &hashinfo->ehash[hash].chain; | ||
68 | lock = &hashinfo->ehash[hash].lock; | ||
69 | write_lock(lock); | ||
70 | } | ||
71 | |||
72 | __sk_add_node(sk, list); | ||
73 | sock_prot_inc_use(sk->sk_prot); | ||
74 | write_unlock(lock); | ||
75 | } | ||
76 | 52 | ||
77 | /* | 53 | /* |
78 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so | 54 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so |
@@ -80,52 +56,12 @@ static inline void __inet6_hash(struct inet_hashinfo *hashinfo, | |||
80 | * | 56 | * |
81 | * The sockhash lock must be held as a reader here. | 57 | * The sockhash lock must be held as a reader here. |
82 | */ | 58 | */ |
83 | static inline struct sock * | 59 | extern struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, |
84 | __inet6_lookup_established(struct inet_hashinfo *hashinfo, | ||
85 | const struct in6_addr *saddr, | 60 | const struct in6_addr *saddr, |
86 | const u16 sport, | 61 | const u16 sport, |
87 | const struct in6_addr *daddr, | 62 | const struct in6_addr *daddr, |
88 | const u16 hnum, | 63 | const u16 hnum, |
89 | const int dif) | 64 | const int dif); |
90 | { | ||
91 | struct sock *sk; | ||
92 | const struct hlist_node *node; | ||
93 | const __u32 ports = INET_COMBINED_PORTS(sport, hnum); | ||
94 | /* Optimize here for direct hit, only listening connections can | ||
95 | * have wildcards anyways. | ||
96 | */ | ||
97 | unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport); | ||
98 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); | ||
99 | |||
100 | prefetch(head->chain.first); | ||
101 | read_lock(&head->lock); | ||
102 | sk_for_each(sk, node, &head->chain) { | ||
103 | /* For IPV6 do the cheaper port and family tests first. */ | ||
104 | if (INET6_MATCH(sk, hash, saddr, daddr, ports, dif)) | ||
105 | goto hit; /* You sunk my battleship! */ | ||
106 | } | ||
107 | /* Must check for a TIME_WAIT'er before going to listener hash. */ | ||
108 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { | ||
109 | const struct inet_timewait_sock *tw = inet_twsk(sk); | ||
110 | |||
111 | if(*((__u32 *)&(tw->tw_dport)) == ports && | ||
112 | sk->sk_family == PF_INET6) { | ||
113 | const struct inet6_timewait_sock *tw6 = inet6_twsk(sk); | ||
114 | |||
115 | if (ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) && | ||
116 | ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) && | ||
117 | (!sk->sk_bound_dev_if || sk->sk_bound_dev_if == dif)) | ||
118 | goto hit; | ||
119 | } | ||
120 | } | ||
121 | read_unlock(&head->lock); | ||
122 | return NULL; | ||
123 | |||
124 | hit: | ||
125 | sock_hold(sk); | ||
126 | read_unlock(&head->lock); | ||
127 | return sk; | ||
128 | } | ||
129 | 65 | ||
130 | extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo, | 66 | extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo, |
131 | const struct in6_addr *daddr, | 67 | const struct in6_addr *daddr, |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 1da294c47522..e837f98fdb50 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -150,7 +150,7 @@ static inline void inet_twsk_add_bind_node(struct inet_timewait_sock *tw, | |||
150 | 150 | ||
151 | static inline int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw) | 151 | static inline int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw) |
152 | { | 152 | { |
153 | return tw->tw_death_node.pprev != NULL; | 153 | return !hlist_unhashed(&tw->tw_death_node); |
154 | } | 154 | } |
155 | 155 | ||
156 | static inline void inet_twsk_dead_node_init(struct inet_timewait_sock *tw) | 156 | static inline void inet_twsk_dead_node_init(struct inet_timewait_sock *tw) |
diff --git a/include/net/ip.h b/include/net/ip.h index 8fe6156ca9b0..3d2e5ca62a5a 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -95,6 +95,7 @@ extern int ip_local_deliver(struct sk_buff *skb); | |||
95 | extern int ip_mr_input(struct sk_buff *skb); | 95 | extern int ip_mr_input(struct sk_buff *skb); |
96 | extern int ip_output(struct sk_buff *skb); | 96 | extern int ip_output(struct sk_buff *skb); |
97 | extern int ip_mc_output(struct sk_buff *skb); | 97 | extern int ip_mc_output(struct sk_buff *skb); |
98 | extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); | ||
98 | extern int ip_do_nat(struct sk_buff *skb); | 99 | extern int ip_do_nat(struct sk_buff *skb); |
99 | extern void ip_send_check(struct iphdr *ip); | 100 | extern void ip_send_check(struct iphdr *ip); |
100 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); | 101 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6d6f0634ae41..4abedb8eaece 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -230,7 +230,7 @@ extern int ip6_ra_control(struct sock *sk, int sel, | |||
230 | void (*destructor)(struct sock *)); | 230 | void (*destructor)(struct sock *)); |
231 | 231 | ||
232 | 232 | ||
233 | extern int ipv6_parse_hopopts(struct sk_buff *skb, int); | 233 | extern int ipv6_parse_hopopts(struct sk_buff *skb); |
234 | 234 | ||
235 | extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt); | 235 | extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt); |
236 | extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, | 236 | extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, |
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h index 86aefb1fda5e..c0c895d379ba 100644 --- a/include/net/irda/irlmp.h +++ b/include/net/irda/irlmp.h | |||
@@ -112,7 +112,7 @@ struct lsap_cb { | |||
112 | 112 | ||
113 | struct timer_list watchdog_timer; | 113 | struct timer_list watchdog_timer; |
114 | 114 | ||
115 | IRLMP_STATE lsap_state; /* Connection state */ | 115 | LSAP_STATE lsap_state; /* Connection state */ |
116 | notify_t notify; /* Indication/Confirm entry points */ | 116 | notify_t notify; /* Indication/Confirm entry points */ |
117 | struct qos_info qos; /* QoS for this connection */ | 117 | struct qos_info qos; /* QoS for this connection */ |
118 | 118 | ||
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index b0666d66293f..4901ee446879 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -211,6 +211,7 @@ struct neigh_table | |||
211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 | 211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 |
212 | 212 | ||
213 | extern void neigh_table_init(struct neigh_table *tbl); | 213 | extern void neigh_table_init(struct neigh_table *tbl); |
214 | extern void neigh_table_init_no_netlink(struct neigh_table *tbl); | ||
214 | extern int neigh_table_clear(struct neigh_table *tbl); | 215 | extern int neigh_table_clear(struct neigh_table *tbl); |
215 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, | 216 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, |
216 | const void *pkey, | 217 | const void *pkey, |
diff --git a/include/net/netrom.h b/include/net/netrom.h index a5ee53bce62f..e0ca112024a3 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -42,11 +42,11 @@ enum { | |||
42 | #define NR_COND_PEER_RX_BUSY 0x04 | 42 | #define NR_COND_PEER_RX_BUSY 0x04 |
43 | #define NR_COND_OWN_RX_BUSY 0x08 | 43 | #define NR_COND_OWN_RX_BUSY 0x08 |
44 | 44 | ||
45 | #define NR_DEFAULT_T1 (120 * HZ) /* Outstanding frames - 120 seconds */ | 45 | #define NR_DEFAULT_T1 120000 /* Outstanding frames - 120 seconds */ |
46 | #define NR_DEFAULT_T2 (5 * HZ) /* Response delay - 5 seconds */ | 46 | #define NR_DEFAULT_T2 5000 /* Response delay - 5 seconds */ |
47 | #define NR_DEFAULT_N2 3 /* Number of Retries - 3 */ | 47 | #define NR_DEFAULT_N2 3 /* Number of Retries - 3 */ |
48 | #define NR_DEFAULT_T4 (180 * HZ) /* Busy Delay - 180 seconds */ | 48 | #define NR_DEFAULT_T4 180000 /* Busy Delay - 180 seconds */ |
49 | #define NR_DEFAULT_IDLE (0 * 60 * HZ) /* No Activity Timeout - none */ | 49 | #define NR_DEFAULT_IDLE 0 /* No Activity Timeout - none */ |
50 | #define NR_DEFAULT_WINDOW 4 /* Default Window Size - 4 */ | 50 | #define NR_DEFAULT_WINDOW 4 /* Default Window Size - 4 */ |
51 | #define NR_DEFAULT_OBS 6 /* Default Obsolescence Count - 6 */ | 51 | #define NR_DEFAULT_OBS 6 /* Default Obsolescence Count - 6 */ |
52 | #define NR_DEFAULT_QUAL 10 /* Default Neighbour Quality - 10 */ | 52 | #define NR_DEFAULT_QUAL 10 /* Default Neighbour Quality - 10 */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 3249b979605a..012b09ed2401 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -49,14 +49,14 @@ enum { | |||
49 | ROSE_STATE_5 /* Deferred Call Acceptance */ | 49 | ROSE_STATE_5 /* Deferred Call Acceptance */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #define ROSE_DEFAULT_T0 (180 * HZ) /* Default T10 T20 value */ | 52 | #define ROSE_DEFAULT_T0 180000 /* Default T10 T20 value */ |
53 | #define ROSE_DEFAULT_T1 (200 * HZ) /* Default T11 T21 value */ | 53 | #define ROSE_DEFAULT_T1 200000 /* Default T11 T21 value */ |
54 | #define ROSE_DEFAULT_T2 (180 * HZ) /* Default T12 T22 value */ | 54 | #define ROSE_DEFAULT_T2 180000 /* Default T12 T22 value */ |
55 | #define ROSE_DEFAULT_T3 (180 * HZ) /* Default T13 T23 value */ | 55 | #define ROSE_DEFAULT_T3 180000 /* Default T13 T23 value */ |
56 | #define ROSE_DEFAULT_HB (5 * HZ) /* Default Holdback value */ | 56 | #define ROSE_DEFAULT_HB 5000 /* Default Holdback value */ |
57 | #define ROSE_DEFAULT_IDLE (0 * 60 * HZ) /* No Activity Timeout - none */ | 57 | #define ROSE_DEFAULT_IDLE 0 /* No Activity Timeout - none */ |
58 | #define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */ | 58 | #define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */ |
59 | #define ROSE_DEFAULT_FAIL_TIMEOUT (120 * HZ) /* Time until link considered usable */ | 59 | #define ROSE_DEFAULT_FAIL_TIMEOUT 120000 /* Time until link considered usable */ |
60 | #define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */ | 60 | #define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */ |
61 | #define ROSE_DEFAULT_WINDOW_SIZE 7 /* Default window size */ | 61 | #define ROSE_DEFAULT_WINDOW_SIZE 7 /* Default window size */ |
62 | 62 | ||
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 34a1a09e5aef..807d6f1ef4b5 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -99,6 +99,7 @@ typedef enum { | |||
99 | SCTP_CMD_DEL_NON_PRIMARY, /* Removes non-primary peer transports. */ | 99 | SCTP_CMD_DEL_NON_PRIMARY, /* Removes non-primary peer transports. */ |
100 | SCTP_CMD_T3_RTX_TIMERS_STOP, /* Stops T3-rtx pending timers */ | 100 | SCTP_CMD_T3_RTX_TIMERS_STOP, /* Stops T3-rtx pending timers */ |
101 | SCTP_CMD_FORCE_PRIM_RETRAN, /* Forces retrans. over primary path. */ | 101 | SCTP_CMD_FORCE_PRIM_RETRAN, /* Forces retrans. over primary path. */ |
102 | SCTP_CMD_SET_SK_ERR, /* Set sk_err */ | ||
102 | SCTP_CMD_LAST | 103 | SCTP_CMD_LAST |
103 | } sctp_verb_t; | 104 | } sctp_verb_t; |
104 | 105 | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index e673b2c984e9..aa6033ca7cd8 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -461,12 +461,12 @@ static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu) | |||
461 | * there is room for a param header too. | 461 | * there is room for a param header too. |
462 | */ | 462 | */ |
463 | #define sctp_walk_params(pos, chunk, member)\ | 463 | #define sctp_walk_params(pos, chunk, member)\ |
464 | _sctp_walk_params((pos), (chunk), WORD_ROUND(ntohs((chunk)->chunk_hdr.length)), member) | 464 | _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member) |
465 | 465 | ||
466 | #define _sctp_walk_params(pos, chunk, end, member)\ | 466 | #define _sctp_walk_params(pos, chunk, end, member)\ |
467 | for (pos.v = chunk->member;\ | 467 | for (pos.v = chunk->member;\ |
468 | pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\ | 468 | pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\ |
469 | pos.v <= (void *)chunk + end - WORD_ROUND(ntohs(pos.p->length)) &&\ | 469 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ |
470 | ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ | 470 | ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ |
471 | pos.v += WORD_ROUND(ntohs(pos.p->length))) | 471 | pos.v += WORD_ROUND(ntohs(pos.p->length))) |
472 | 472 | ||
@@ -477,7 +477,7 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length)) | |||
477 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ | 477 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ |
478 | sizeof(sctp_chunkhdr_t));\ | 478 | sizeof(sctp_chunkhdr_t));\ |
479 | (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\ | 479 | (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\ |
480 | (void *)err <= (void *)chunk_hdr + end - WORD_ROUND(ntohs(err->length)) &&\ | 480 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ |
481 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ | 481 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ |
482 | err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) | 482 | err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) |
483 | 483 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index eba99f375517..7f4fea173fb1 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -712,6 +712,7 @@ struct sctp_chunk { | |||
712 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ | 712 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ |
713 | __s8 fast_retransmit; /* Is this chunk fast retransmitted? */ | 713 | __s8 fast_retransmit; /* Is this chunk fast retransmitted? */ |
714 | __u8 tsn_missing_report; /* Data chunk missing counter. */ | 714 | __u8 tsn_missing_report; /* Data chunk missing counter. */ |
715 | __u8 data_accepted; /* At least 1 chunk in this packet accepted */ | ||
715 | }; | 716 | }; |
716 | 717 | ||
717 | void sctp_chunk_hold(struct sctp_chunk *); | 718 | void sctp_chunk_hold(struct sctp_chunk *); |
diff --git a/include/net/sock.h b/include/net/sock.h index af2b0544586e..c9fad6fb629b 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -279,7 +279,7 @@ static inline int sk_unhashed(const struct sock *sk) | |||
279 | 279 | ||
280 | static inline int sk_hashed(const struct sock *sk) | 280 | static inline int sk_hashed(const struct sock *sk) |
281 | { | 281 | { |
282 | return sk->sk_node.pprev != NULL; | 282 | return !sk_unhashed(sk); |
283 | } | 283 | } |
284 | 284 | ||
285 | static __inline__ void sk_node_init(struct hlist_node *node) | 285 | static __inline__ void sk_node_init(struct hlist_node *node) |
@@ -454,6 +454,7 @@ static inline void sk_stream_set_owner_r(struct sk_buff *skb, struct sock *sk) | |||
454 | 454 | ||
455 | static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb) | 455 | static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb) |
456 | { | 456 | { |
457 | skb_truesize_check(skb); | ||
457 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); | 458 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); |
458 | sk->sk_wmem_queued -= skb->truesize; | 459 | sk->sk_wmem_queued -= skb->truesize; |
459 | sk->sk_forward_alloc += skb->truesize; | 460 | sk->sk_forward_alloc += skb->truesize; |
diff --git a/include/net/x25device.h b/include/net/x25device.h index 1a318374faef..1d10c879f7e2 100644 --- a/include/net/x25device.h +++ b/include/net/x25device.h | |||
@@ -8,6 +8,7 @@ | |||
8 | static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev) | 8 | static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev) |
9 | { | 9 | { |
10 | skb->mac.raw = skb->data; | 10 | skb->mac.raw = skb->data; |
11 | skb->dev = dev; | ||
11 | skb->pkt_type = PACKET_HOST; | 12 | skb->pkt_type = PACKET_HOST; |
12 | 13 | ||
13 | return htons(ETH_P_X25); | 14 | return htons(ETH_P_X25); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 0d5529c382e8..afa508d92c93 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -143,6 +143,11 @@ struct xfrm_state | |||
143 | /* Replay detection state at the time we sent the last notification */ | 143 | /* Replay detection state at the time we sent the last notification */ |
144 | struct xfrm_replay_state preplay; | 144 | struct xfrm_replay_state preplay; |
145 | 145 | ||
146 | /* internal flag that only holds state for delayed aevent at the | ||
147 | * moment | ||
148 | */ | ||
149 | u32 xflags; | ||
150 | |||
146 | /* Replay detection notification settings */ | 151 | /* Replay detection notification settings */ |
147 | u32 replay_maxage; | 152 | u32 replay_maxage; |
148 | u32 replay_maxdiff; | 153 | u32 replay_maxdiff; |
@@ -168,6 +173,9 @@ struct xfrm_state | |||
168 | void *data; | 173 | void *data; |
169 | }; | 174 | }; |
170 | 175 | ||
176 | /* xflags - make enum if more show up */ | ||
177 | #define XFRM_TIME_DEFER 1 | ||
178 | |||
171 | enum { | 179 | enum { |
172 | XFRM_STATE_VOID, | 180 | XFRM_STATE_VOID, |
173 | XFRM_STATE_ACQ, | 181 | XFRM_STATE_ACQ, |