diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-08 19:06:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-08 19:06:01 -0400 |
commit | 92e52b2e82bec10a70744d4a2b04e0ff2dfe2c98 (patch) | |
tree | 74a41755d00b908b6e6e31a69ba77774558bf26f | |
parent | 03c6b749b364fe7b8e47ed8e1ce26baca167c322 (diff) | |
parent | ca9334523c853e407da7b3a0bd02f54d0fa59414 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r-- | drivers/net/tg3.c | 16 | ||||
-rw-r--r-- | include/linux/netlink.h | 4 | ||||
-rw-r--r-- | net/ipv4/icmp.c | 3 | ||||
-rw-r--r-- | net/ipv4/ip_fragment.c | 8 | ||||
-rw-r--r-- | net/ipv4/ip_sockglue.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 14 | ||||
-rw-r--r-- | net/ipv4/udp.c | 34 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 3 |
8 files changed, 41 insertions, 44 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 201a550f0bcc..368b8fb14023 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -66,8 +66,8 @@ | |||
66 | 66 | ||
67 | #define DRV_MODULE_NAME "tg3" | 67 | #define DRV_MODULE_NAME "tg3" |
68 | #define PFX DRV_MODULE_NAME ": " | 68 | #define PFX DRV_MODULE_NAME ": " |
69 | #define DRV_MODULE_VERSION "3.34" | 69 | #define DRV_MODULE_VERSION "3.35" |
70 | #define DRV_MODULE_RELDATE "July 25, 2005" | 70 | #define DRV_MODULE_RELDATE "August 6, 2005" |
71 | 71 | ||
72 | #define TG3_DEF_MAC_MODE 0 | 72 | #define TG3_DEF_MAC_MODE 0 |
73 | #define TG3_DEF_RX_MODE 0 | 73 | #define TG3_DEF_RX_MODE 0 |
@@ -10421,6 +10421,12 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10421 | 10421 | ||
10422 | tg3_init_coal(tp); | 10422 | tg3_init_coal(tp); |
10423 | 10423 | ||
10424 | /* Now that we have fully setup the chip, save away a snapshot | ||
10425 | * of the PCI config space. We need to restore this after | ||
10426 | * GRC_MISC_CFG core clock resets and some resume events. | ||
10427 | */ | ||
10428 | pci_save_state(tp->pdev); | ||
10429 | |||
10424 | err = register_netdev(dev); | 10430 | err = register_netdev(dev); |
10425 | if (err) { | 10431 | if (err) { |
10426 | printk(KERN_ERR PFX "Cannot register net device, " | 10432 | printk(KERN_ERR PFX "Cannot register net device, " |
@@ -10430,12 +10436,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10430 | 10436 | ||
10431 | pci_set_drvdata(pdev, dev); | 10437 | pci_set_drvdata(pdev, dev); |
10432 | 10438 | ||
10433 | /* Now that we have fully setup the chip, save away a snapshot | ||
10434 | * of the PCI config space. We need to restore this after | ||
10435 | * GRC_MISC_CFG core clock resets and some resume events. | ||
10436 | */ | ||
10437 | pci_save_state(tp->pdev); | ||
10438 | |||
10439 | printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (PCI%s:%s:%s) %sBaseT Ethernet ", | 10439 | printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (PCI%s:%s:%s) %sBaseT Ethernet ", |
10440 | dev->name, | 10440 | dev->name, |
10441 | tp->board_part_number, | 10441 | tp->board_part_number, |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 70c2a9dc4b2b..6552b71bfa73 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -12,15 +12,13 @@ | |||
12 | #define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ | 12 | #define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ |
13 | #define NETLINK_XFRM 6 /* ipsec */ | 13 | #define NETLINK_XFRM 6 /* ipsec */ |
14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ | 14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ |
15 | #define NETLINK_ARPD 8 | 15 | #define NETLINK_ISCSI 8 /* Open-iSCSI */ |
16 | #define NETLINK_AUDIT 9 /* auditing */ | 16 | #define NETLINK_AUDIT 9 /* auditing */ |
17 | #define NETLINK_FIB_LOOKUP 10 | 17 | #define NETLINK_FIB_LOOKUP 10 |
18 | #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ | ||
19 | #define NETLINK_NETFILTER 12 /* netfilter subsystem */ | 18 | #define NETLINK_NETFILTER 12 /* netfilter subsystem */ |
20 | #define NETLINK_IP6_FW 13 | 19 | #define NETLINK_IP6_FW 13 |
21 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ | 20 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
22 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ | 21 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ |
23 | #define NETLINK_TAPBASE 16 /* 16 to 31 are ethertap */ | ||
24 | 22 | ||
25 | #define MAX_LINKS 32 | 23 | #define MAX_LINKS 32 |
26 | 24 | ||
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 279f57abfecb..3d78464f64ea 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -936,8 +936,7 @@ int icmp_rcv(struct sk_buff *skb) | |||
936 | case CHECKSUM_HW: | 936 | case CHECKSUM_HW: |
937 | if (!(u16)csum_fold(skb->csum)) | 937 | if (!(u16)csum_fold(skb->csum)) |
938 | break; | 938 | break; |
939 | NETDEBUG(if (net_ratelimit()) | 939 | LIMIT_NETDEBUG(printk(KERN_DEBUG "icmp v4 hw csum failure\n")); |
940 | printk(KERN_DEBUG "icmp v4 hw csum failure\n")); | ||
941 | case CHECKSUM_NONE: | 940 | case CHECKSUM_NONE: |
942 | if ((u16)csum_fold(skb_checksum(skb, 0, skb->len, 0))) | 941 | if ((u16)csum_fold(skb_checksum(skb, 0, skb->len, 0))) |
943 | goto error; | 942 | goto error; |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 7f68e27eb4ea..eb377ae15305 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -377,7 +377,7 @@ static struct ipq *ip_frag_create(unsigned hash, struct iphdr *iph, u32 user) | |||
377 | return ip_frag_intern(hash, qp); | 377 | return ip_frag_intern(hash, qp); |
378 | 378 | ||
379 | out_nomem: | 379 | out_nomem: |
380 | NETDEBUG(if (net_ratelimit()) printk(KERN_ERR "ip_frag_create: no memory left !\n")); | 380 | LIMIT_NETDEBUG(printk(KERN_ERR "ip_frag_create: no memory left !\n")); |
381 | return NULL; | 381 | return NULL; |
382 | } | 382 | } |
383 | 383 | ||
@@ -625,10 +625,8 @@ static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev) | |||
625 | return head; | 625 | return head; |
626 | 626 | ||
627 | out_nomem: | 627 | out_nomem: |
628 | NETDEBUG(if (net_ratelimit()) | 628 | LIMIT_NETDEBUG(printk(KERN_ERR "IP: queue_glue: no memory for gluing " |
629 | printk(KERN_ERR | 629 | "queue %p\n", qp)); |
630 | "IP: queue_glue: no memory for gluing queue %p\n", | ||
631 | qp)); | ||
632 | goto out_fail; | 630 | goto out_fail; |
633 | out_oversize: | 631 | out_oversize: |
634 | if (net_ratelimit()) | 632 | if (net_ratelimit()) |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index fc7c481d0d79..ff4bd067b397 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -848,6 +848,9 @@ mc_msf_out: | |||
848 | 848 | ||
849 | case IP_IPSEC_POLICY: | 849 | case IP_IPSEC_POLICY: |
850 | case IP_XFRM_POLICY: | 850 | case IP_XFRM_POLICY: |
851 | err = -EPERM; | ||
852 | if (!capable(CAP_NET_ADMIN)) | ||
853 | break; | ||
851 | err = xfrm_user_policy(sk, optname, optval, optlen); | 854 | err = xfrm_user_policy(sk, optname, optval, optlen); |
852 | break; | 855 | break; |
853 | 856 | ||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 62f62bb05c2a..5d91213d34c0 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1494,12 +1494,11 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1494 | * to destinations, already remembered | 1494 | * to destinations, already remembered |
1495 | * to the moment of synflood. | 1495 | * to the moment of synflood. |
1496 | */ | 1496 | */ |
1497 | NETDEBUG(if (net_ratelimit()) \ | 1497 | LIMIT_NETDEBUG(printk(KERN_DEBUG "TCP: drop open " |
1498 | printk(KERN_DEBUG "TCP: drop open " | 1498 | "request from %u.%u." |
1499 | "request from %u.%u." | 1499 | "%u.%u/%u\n", |
1500 | "%u.%u/%u\n", \ | 1500 | NIPQUAD(saddr), |
1501 | NIPQUAD(saddr), | 1501 | ntohs(skb->h.th->source))); |
1502 | ntohs(skb->h.th->source))); | ||
1503 | dst_release(dst); | 1502 | dst_release(dst); |
1504 | goto drop_and_free; | 1503 | goto drop_and_free; |
1505 | } | 1504 | } |
@@ -1627,8 +1626,7 @@ static int tcp_v4_checksum_init(struct sk_buff *skb) | |||
1627 | skb->nh.iph->daddr, skb->csum)) | 1626 | skb->nh.iph->daddr, skb->csum)) |
1628 | return 0; | 1627 | return 0; |
1629 | 1628 | ||
1630 | NETDEBUG(if (net_ratelimit()) | 1629 | LIMIT_NETDEBUG(printk(KERN_DEBUG "hw tcp v4 csum failed\n")); |
1631 | printk(KERN_DEBUG "hw tcp v4 csum failed\n")); | ||
1632 | skb->ip_summed = CHECKSUM_NONE; | 1630 | skb->ip_summed = CHECKSUM_NONE; |
1633 | } | 1631 | } |
1634 | if (skb->len <= 76) { | 1632 | if (skb->len <= 76) { |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 7c24e64b443f..dc4d07357e3a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -628,7 +628,7 @@ back_from_confirm: | |||
628 | /* ... which is an evident application bug. --ANK */ | 628 | /* ... which is an evident application bug. --ANK */ |
629 | release_sock(sk); | 629 | release_sock(sk); |
630 | 630 | ||
631 | NETDEBUG(if (net_ratelimit()) printk(KERN_DEBUG "udp cork app bug 2\n")); | 631 | LIMIT_NETDEBUG(printk(KERN_DEBUG "udp cork app bug 2\n")); |
632 | err = -EINVAL; | 632 | err = -EINVAL; |
633 | goto out; | 633 | goto out; |
634 | } | 634 | } |
@@ -693,7 +693,7 @@ static int udp_sendpage(struct sock *sk, struct page *page, int offset, | |||
693 | if (unlikely(!up->pending)) { | 693 | if (unlikely(!up->pending)) { |
694 | release_sock(sk); | 694 | release_sock(sk); |
695 | 695 | ||
696 | NETDEBUG(if (net_ratelimit()) printk(KERN_DEBUG "udp cork app bug 3\n")); | 696 | LIMIT_NETDEBUG(printk(KERN_DEBUG "udp cork app bug 3\n")); |
697 | return -EINVAL; | 697 | return -EINVAL; |
698 | } | 698 | } |
699 | 699 | ||
@@ -1102,7 +1102,7 @@ static int udp_checksum_init(struct sk_buff *skb, struct udphdr *uh, | |||
1102 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 1102 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
1103 | if (!udp_check(uh, ulen, saddr, daddr, skb->csum)) | 1103 | if (!udp_check(uh, ulen, saddr, daddr, skb->csum)) |
1104 | return 0; | 1104 | return 0; |
1105 | NETDEBUG(if (net_ratelimit()) printk(KERN_DEBUG "udp v4 hw csum failure.\n")); | 1105 | LIMIT_NETDEBUG(printk(KERN_DEBUG "udp v4 hw csum failure.\n")); |
1106 | skb->ip_summed = CHECKSUM_NONE; | 1106 | skb->ip_summed = CHECKSUM_NONE; |
1107 | } | 1107 | } |
1108 | if (skb->ip_summed != CHECKSUM_UNNECESSARY) | 1108 | if (skb->ip_summed != CHECKSUM_UNNECESSARY) |
@@ -1181,14 +1181,13 @@ int udp_rcv(struct sk_buff *skb) | |||
1181 | return(0); | 1181 | return(0); |
1182 | 1182 | ||
1183 | short_packet: | 1183 | short_packet: |
1184 | NETDEBUG(if (net_ratelimit()) | 1184 | LIMIT_NETDEBUG(printk(KERN_DEBUG "UDP: short packet: From %u.%u.%u.%u:%u %d/%d to %u.%u.%u.%u:%u\n", |
1185 | printk(KERN_DEBUG "UDP: short packet: From %u.%u.%u.%u:%u %d/%d to %u.%u.%u.%u:%u\n", | 1185 | NIPQUAD(saddr), |
1186 | NIPQUAD(saddr), | 1186 | ntohs(uh->source), |
1187 | ntohs(uh->source), | 1187 | ulen, |
1188 | ulen, | 1188 | len, |
1189 | len, | 1189 | NIPQUAD(daddr), |
1190 | NIPQUAD(daddr), | 1190 | ntohs(uh->dest))); |
1191 | ntohs(uh->dest))); | ||
1192 | no_header: | 1191 | no_header: |
1193 | UDP_INC_STATS_BH(UDP_MIB_INERRORS); | 1192 | UDP_INC_STATS_BH(UDP_MIB_INERRORS); |
1194 | kfree_skb(skb); | 1193 | kfree_skb(skb); |
@@ -1199,13 +1198,12 @@ csum_error: | |||
1199 | * RFC1122: OK. Discards the bad packet silently (as far as | 1198 | * RFC1122: OK. Discards the bad packet silently (as far as |
1200 | * the network is concerned, anyway) as per 4.1.3.4 (MUST). | 1199 | * the network is concerned, anyway) as per 4.1.3.4 (MUST). |
1201 | */ | 1200 | */ |
1202 | NETDEBUG(if (net_ratelimit()) | 1201 | LIMIT_NETDEBUG(printk(KERN_DEBUG "UDP: bad checksum. From %d.%d.%d.%d:%d to %d.%d.%d.%d:%d ulen %d\n", |
1203 | printk(KERN_DEBUG "UDP: bad checksum. From %d.%d.%d.%d:%d to %d.%d.%d.%d:%d ulen %d\n", | 1202 | NIPQUAD(saddr), |
1204 | NIPQUAD(saddr), | 1203 | ntohs(uh->source), |
1205 | ntohs(uh->source), | 1204 | NIPQUAD(daddr), |
1206 | NIPQUAD(daddr), | 1205 | ntohs(uh->dest), |
1207 | ntohs(uh->dest), | 1206 | ulen)); |
1208 | ulen)); | ||
1209 | drop: | 1207 | drop: |
1210 | UDP_INC_STATS_BH(UDP_MIB_INERRORS); | 1208 | UDP_INC_STATS_BH(UDP_MIB_INERRORS); |
1211 | kfree_skb(skb); | 1209 | kfree_skb(skb); |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index f3ef4c38d315..3bc144a79fa5 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -504,6 +504,9 @@ done: | |||
504 | break; | 504 | break; |
505 | case IPV6_IPSEC_POLICY: | 505 | case IPV6_IPSEC_POLICY: |
506 | case IPV6_XFRM_POLICY: | 506 | case IPV6_XFRM_POLICY: |
507 | retv = -EPERM; | ||
508 | if (!capable(CAP_NET_ADMIN)) | ||
509 | break; | ||
507 | retv = xfrm_user_policy(sk, optname, optval, optlen); | 510 | retv = xfrm_user_policy(sk, optname, optval, optlen); |
508 | break; | 511 | break; |
509 | 512 | ||