aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-06-11 11:39:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-11 11:39:51 -0400
commitf7f866eed01b7a03dd5aa36daf3c2c2721f922da (patch)
treeb2871f376e3db490955c2fda623c01c3f615d699 /net
parent7427d8b815c7fc0b005a17cf3952b7ebef0481d2 (diff)
parent513fd370e6832f81ab717df4645f5ce679e44f14 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits) net: Fix routing tables with id > 255 for legacy software sky2: Hold RTNL while calling dev_close() s2io iomem annotations atl1: fix suspend regression qeth: start dev queue after tx drop error qeth: Prepare-function to call s390dbf was wrong qeth: reduce number of kernel messages qeth: Use ccw_device_get_id(). qeth: layer 3 Oops in ip event handler virtio: use callback on empty in virtio_net virtio: virtio_net free transmit skbs in a timer virtio: Fix typo in virtio_net_hdr comments virtio_net: Fix skb->csum_start computation ehea: set mac address fix sfc: Recover from RX queue flush failure add missing lance_* exports ixgbe: fix typo forcedeth: msi interrupts ipsec: pfkey should ignore events when no listeners pppoe: Unshare skb before anything else ...
Diffstat (limited to 'net')
-rw-r--r--net/dccp/ipv4.c3
-rw-r--r--net/dccp/ipv6.c1
-rw-r--r--net/ipv4/fib_semantics.c5
-rw-r--r--net/ipv4/syncookies.c3
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv6/af_inet6.c2
-rw-r--r--net/ipv6/syncookies.c1
-rw-r--r--net/ipv6/tcp_ipv6.c1
-rw-r--r--net/key/af_key.c3
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/main.c1
-rw-r--r--net/mac80211/mlme.c18
-rw-r--r--net/mac80211/wext.c15
13 files changed, 34 insertions, 23 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index c22a3780c14e..37d27bcb361f 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -589,7 +589,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
589 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 589 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
590 goto drop; 590 goto drop;
591 591
592 req = reqsk_alloc(&dccp_request_sock_ops); 592 req = inet_reqsk_alloc(&dccp_request_sock_ops);
593 if (req == NULL) 593 if (req == NULL)
594 goto drop; 594 goto drop;
595 595
@@ -605,7 +605,6 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
605 ireq = inet_rsk(req); 605 ireq = inet_rsk(req);
606 ireq->loc_addr = ip_hdr(skb)->daddr; 606 ireq->loc_addr = ip_hdr(skb)->daddr;
607 ireq->rmt_addr = ip_hdr(skb)->saddr; 607 ireq->rmt_addr = ip_hdr(skb)->saddr;
608 ireq->opt = NULL;
609 608
610 /* 609 /*
611 * Step 3: Process LISTEN state 610 * Step 3: Process LISTEN state
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 9b1129bb7ece..f7fe2a572d7b 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -421,7 +421,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
421 ireq6 = inet6_rsk(req); 421 ireq6 = inet6_rsk(req);
422 ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr); 422 ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr);
423 ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr); 423 ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr);
424 ireq6->pktopts = NULL;
425 424
426 if (ipv6_opt_accepted(sk, skb) || 425 if (ipv6_opt_accepted(sk, skb) ||
427 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || 426 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 3b83c34019fc..0d4d72827e4b 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -960,7 +960,10 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
960 rtm->rtm_dst_len = dst_len; 960 rtm->rtm_dst_len = dst_len;
961 rtm->rtm_src_len = 0; 961 rtm->rtm_src_len = 0;
962 rtm->rtm_tos = tos; 962 rtm->rtm_tos = tos;
963 rtm->rtm_table = tb_id; 963 if (tb_id < 256)
964 rtm->rtm_table = tb_id;
965 else
966 rtm->rtm_table = RT_TABLE_COMPAT;
964 NLA_PUT_U32(skb, RTA_TABLE, tb_id); 967 NLA_PUT_U32(skb, RTA_TABLE, tb_id);
965 rtm->rtm_type = type; 968 rtm->rtm_type = type;
966 rtm->rtm_flags = fi->fib_flags; 969 rtm->rtm_flags = fi->fib_flags;
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 73ba98921d64..d182a2a26291 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -285,7 +285,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
285 cookie_check_timestamp(&tcp_opt); 285 cookie_check_timestamp(&tcp_opt);
286 286
287 ret = NULL; 287 ret = NULL;
288 req = reqsk_alloc(&tcp_request_sock_ops); /* for safety */ 288 req = inet_reqsk_alloc(&tcp_request_sock_ops); /* for safety */
289 if (!req) 289 if (!req)
290 goto out; 290 goto out;
291 291
@@ -301,7 +301,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
301 ireq->rmt_port = th->source; 301 ireq->rmt_port = th->source;
302 ireq->loc_addr = ip_hdr(skb)->daddr; 302 ireq->loc_addr = ip_hdr(skb)->daddr;
303 ireq->rmt_addr = ip_hdr(skb)->saddr; 303 ireq->rmt_addr = ip_hdr(skb)->saddr;
304 ireq->opt = NULL;
305 ireq->snd_wscale = tcp_opt.snd_wscale; 304 ireq->snd_wscale = tcp_opt.snd_wscale;
306 ireq->rcv_wscale = tcp_opt.rcv_wscale; 305 ireq->rcv_wscale = tcp_opt.rcv_wscale;
307 ireq->sack_ok = tcp_opt.sack_ok; 306 ireq->sack_ok = tcp_opt.sack_ok;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index cd601a866c2f..4f8485c67d1a 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1285,7 +1285,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
1285 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 1285 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
1286 goto drop; 1286 goto drop;
1287 1287
1288 req = reqsk_alloc(&tcp_request_sock_ops); 1288 req = inet_reqsk_alloc(&tcp_request_sock_ops);
1289 if (!req) 1289 if (!req)
1290 goto drop; 1290 goto drop;
1291 1291
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 3c6aafb02183..e84b3fd17fb4 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -191,7 +191,7 @@ lookup_protocol:
191 np->mcast_hops = -1; 191 np->mcast_hops = -1;
192 np->mc_loop = 1; 192 np->mc_loop = 1;
193 np->pmtudisc = IPV6_PMTUDISC_WANT; 193 np->pmtudisc = IPV6_PMTUDISC_WANT;
194 np->ipv6only = init_net.ipv6.sysctl.bindv6only; 194 np->ipv6only = net->ipv6.sysctl.bindv6only;
195 195
196 /* Init the ipv4 part of the socket since we can have sockets 196 /* Init the ipv4 part of the socket since we can have sockets
197 * using v6 API for ipv4. 197 * using v6 API for ipv4.
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 938ce4ecde55..3ecc1157994e 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -198,7 +198,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
198 ireq = inet_rsk(req); 198 ireq = inet_rsk(req);
199 ireq6 = inet6_rsk(req); 199 ireq6 = inet6_rsk(req);
200 treq = tcp_rsk(req); 200 treq = tcp_rsk(req);
201 ireq6->pktopts = NULL;
202 201
203 if (security_inet_conn_request(sk, skb, req)) { 202 if (security_inet_conn_request(sk, skb, req)) {
204 reqsk_free(req); 203 reqsk_free(req);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 715965f0fac0..cb46749d4c32 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1299,7 +1299,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
1299 treq = inet6_rsk(req); 1299 treq = inet6_rsk(req);
1300 ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr); 1300 ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr);
1301 ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr); 1301 ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr);
1302 treq->pktopts = NULL;
1303 if (!want_cookie) 1302 if (!want_cookie)
1304 TCP_ECN_create_request(req, tcp_hdr(skb)); 1303 TCP_ECN_create_request(req, tcp_hdr(skb));
1305 1304
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 9bba7ac5fee0..7470e367272b 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3030,6 +3030,9 @@ static int key_notify_sa_expire(struct xfrm_state *x, struct km_event *c)
3030 3030
3031static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c) 3031static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c)
3032{ 3032{
3033 if (atomic_read(&pfkey_socks_nr) == 0)
3034 return 0;
3035
3033 switch (c->event) { 3036 switch (c->event) {
3034 case XFRM_MSG_EXPIRE: 3037 case XFRM_MSG_EXPIRE:
3035 return key_notify_sa_expire(x, c); 3038 return key_notify_sa_expire(x, c);
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c7314bf4bec2..006486b26726 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -899,7 +899,7 @@ extern const struct iw_handler_def ieee80211_iw_handler_def;
899 899
900 900
901/* ieee80211_ioctl.c */ 901/* ieee80211_ioctl.c */
902int ieee80211_set_freq(struct ieee80211_local *local, int freq); 902int ieee80211_set_freq(struct net_device *dev, int freq);
903/* ieee80211_sta.c */ 903/* ieee80211_sta.c */
904void ieee80211_sta_timer(unsigned long data); 904void ieee80211_sta_timer(unsigned long data);
905void ieee80211_sta_work(struct work_struct *work); 905void ieee80211_sta_work(struct work_struct *work);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 5c876450b14c..98c0b5e56ecc 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -511,6 +511,7 @@ static int ieee80211_stop(struct net_device *dev)
511 case IEEE80211_IF_TYPE_STA: 511 case IEEE80211_IF_TYPE_STA:
512 case IEEE80211_IF_TYPE_IBSS: 512 case IEEE80211_IF_TYPE_IBSS:
513 sdata->u.sta.state = IEEE80211_DISABLED; 513 sdata->u.sta.state = IEEE80211_DISABLED;
514 memset(sdata->u.sta.bssid, 0, ETH_ALEN);
514 del_timer_sync(&sdata->u.sta.timer); 515 del_timer_sync(&sdata->u.sta.timer);
515 /* 516 /*
516 * When we get here, the interface is marked down. 517 * When we get here, the interface is marked down.
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 841278f1df8e..4d2b582dd055 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -44,7 +44,7 @@
44#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ) 44#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ)
45#define IEEE80211_SCAN_INTERVAL (2 * HZ) 45#define IEEE80211_SCAN_INTERVAL (2 * HZ)
46#define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ) 46#define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ)
47#define IEEE80211_IBSS_JOIN_TIMEOUT (20 * HZ) 47#define IEEE80211_IBSS_JOIN_TIMEOUT (7 * HZ)
48 48
49#define IEEE80211_PROBE_DELAY (HZ / 33) 49#define IEEE80211_PROBE_DELAY (HZ / 33)
50#define IEEE80211_CHANNEL_TIME (HZ / 33) 50#define IEEE80211_CHANNEL_TIME (HZ / 33)
@@ -2336,6 +2336,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2336 u8 *pos; 2336 u8 *pos;
2337 struct ieee80211_sub_if_data *sdata; 2337 struct ieee80211_sub_if_data *sdata;
2338 struct ieee80211_supported_band *sband; 2338 struct ieee80211_supported_band *sband;
2339 union iwreq_data wrqu;
2339 2340
2340 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2341 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
2341 2342
@@ -2358,13 +2359,10 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2358 sdata->drop_unencrypted = bss->capability & 2359 sdata->drop_unencrypted = bss->capability &
2359 WLAN_CAPABILITY_PRIVACY ? 1 : 0; 2360 WLAN_CAPABILITY_PRIVACY ? 1 : 0;
2360 2361
2361 res = ieee80211_set_freq(local, bss->freq); 2362 res = ieee80211_set_freq(dev, bss->freq);
2362 2363
2363 if (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS) { 2364 if (res)
2364 printk(KERN_DEBUG "%s: IBSS not allowed on frequency " 2365 return res;
2365 "%d MHz\n", dev->name, local->oper_channel->center_freq);
2366 return -1;
2367 }
2368 2366
2369 /* Set beacon template */ 2367 /* Set beacon template */
2370 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400); 2368 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400);
@@ -2479,6 +2477,10 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2479 ifsta->state = IEEE80211_IBSS_JOINED; 2477 ifsta->state = IEEE80211_IBSS_JOINED;
2480 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); 2478 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL);
2481 2479
2480 memset(&wrqu, 0, sizeof(wrqu));
2481 memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN);
2482 wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
2483
2482 return res; 2484 return res;
2483} 2485}
2484 2486
@@ -3486,7 +3488,7 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
3486 spin_unlock_bh(&local->sta_bss_lock); 3488 spin_unlock_bh(&local->sta_bss_lock);
3487 3489
3488 if (selected) { 3490 if (selected) {
3489 ieee80211_set_freq(local, selected->freq); 3491 ieee80211_set_freq(dev, selected->freq);
3490 if (!(ifsta->flags & IEEE80211_STA_SSID_SET)) 3492 if (!(ifsta->flags & IEEE80211_STA_SSID_SET))
3491 ieee80211_sta_set_ssid(dev, selected->ssid, 3493 ieee80211_sta_set_ssid(dev, selected->ssid,
3492 selected->ssid_len); 3494 selected->ssid_len);
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 8311bb24f9f3..a8bb8e31b1ec 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -290,14 +290,22 @@ static int ieee80211_ioctl_giwmode(struct net_device *dev,
290 return 0; 290 return 0;
291} 291}
292 292
293int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz) 293int ieee80211_set_freq(struct net_device *dev, int freqMHz)
294{ 294{
295 int ret = -EINVAL; 295 int ret = -EINVAL;
296 struct ieee80211_channel *chan; 296 struct ieee80211_channel *chan;
297 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
298 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
297 299
298 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); 300 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz);
299 301
300 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { 302 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
303 if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS &&
304 chan->flags & IEEE80211_CHAN_NO_IBSS) {
305 printk(KERN_DEBUG "%s: IBSS not allowed on frequency "
306 "%d MHz\n", dev->name, chan->center_freq);
307 return ret;
308 }
301 local->oper_channel = chan; 309 local->oper_channel = chan;
302 310
303 if (local->sta_sw_scanning || local->sta_hw_scanning) 311 if (local->sta_sw_scanning || local->sta_hw_scanning)
@@ -315,7 +323,6 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
315 struct iw_request_info *info, 323 struct iw_request_info *info,
316 struct iw_freq *freq, char *extra) 324 struct iw_freq *freq, char *extra)
317{ 325{
318 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
319 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 326 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
320 327
321 if (sdata->vif.type == IEEE80211_IF_TYPE_STA) 328 if (sdata->vif.type == IEEE80211_IF_TYPE_STA)
@@ -329,14 +336,14 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
329 IEEE80211_STA_AUTO_CHANNEL_SEL; 336 IEEE80211_STA_AUTO_CHANNEL_SEL;
330 return 0; 337 return 0;
331 } else 338 } else
332 return ieee80211_set_freq(local, 339 return ieee80211_set_freq(dev,
333 ieee80211_channel_to_frequency(freq->m)); 340 ieee80211_channel_to_frequency(freq->m));
334 } else { 341 } else {
335 int i, div = 1000000; 342 int i, div = 1000000;
336 for (i = 0; i < freq->e; i++) 343 for (i = 0; i < freq->e; i++)
337 div /= 10; 344 div /= 10;
338 if (div > 0) 345 if (div > 0)
339 return ieee80211_set_freq(local, freq->m / div); 346 return ieee80211_set_freq(dev, freq->m / div);
340 else 347 else
341 return -EINVAL; 348 return -EINVAL;
342 } 349 }