aboutsummaryrefslogtreecommitdiff
path: root/net/core
AgeCommit message (Collapse)AuthorFilesLines
2006-09-24Merge branch 'upstream-linus' of ↵Linus Torvalds1-7/+7
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (217 commits) net/ieee80211: fix more crypto-related build breakage [PATCH] Spidernet: add ethtool -S (show statistics) [NET] GT96100: Delete bitrotting ethernet driver [PATCH] mv643xx_eth: restrict to 32-bit PPC_MULTIPLATFORM [PATCH] Cirrus Logic ep93xx ethernet driver r8169: the MMIO region of the 8167 stands behin BAR#1 e1000, ixgb: Remove pointless wrappers [PATCH] Remove powerpc specific parts of 3c509 driver [PATCH] s2io: Switch to pci_get_device [PATCH] gt96100: move to pci_get_device API [PATCH] ehea: bugfix for register access functions [PATCH] e1000 disable device on PCI error drivers/net/phy/fixed: #if 0 some incomplete code drivers/net: const-ify ethtool_ops declarations [PATCH] ethtool: allow const ethtool_ops [PATCH] sky2: big endian [PATCH] sky2: fiber support [PATCH] sky2: tx pause bug fix drivers/net: Trim trailing whitespace [PATCH] ehea: IBM eHEA Ethernet Device Driver ... Manually resolved conflicts in drivers/net/ixgb/ixgb_main.c and drivers/net/sky2.c related to CHECKSUM_HW/CHECKSUM_PARTIAL changes by commit 84fa7933a33f806bbbaae6775e87459b1ec584c0 that just happened to be next to unrelated changes in this update.
2006-09-22[IPV6] ADDRCONF: Convert addrconf_lock to RCU.YOSHIFUJI Hideaki1-2/+2
Signed-off-by: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[IPV6] NDISC: Set per-entry is_router flag in Proxy NA.Ville Nuorvala1-3/+8
We have sent NA with router flag from the node-wide forwarding configuration. This is not appropriate for proxy NA, and it should be set according to each proxy entry's configuration. This is used by Mobile IPv6 home agent to support physical home link in acting as a proxy router for mobile node which is not a router, for example. Based on MIPL2 kernel patch. Signed-off-by: Ville Nuorvala <[email protected]> Signed-off-by: Masahide NAKAMURA <[email protected]> Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
2006-09-22[RTNETLINK]: Fix netdevice name corruptionPatrick McHardy1-0/+2
When changing a device by ifindex without including a IFLA_IFNAME attribute, the ifname variable contains random garbage and is used to change the device name. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Fix sk->sk_filter field accessDmitry Mishin2-17/+13
Function sk_filter() is called from tcp_v{4,6}_rcv() functions with arg needlock = 0, while socket is not locked at that moment. In order to avoid this and similar issues in the future, use rcu for sk->sk_filter field read protection. Signed-off-by: Dmitry Mishin <[email protected]> Signed-off-by: Alexey Kuznetsov <[email protected]> Signed-off-by: Kirill Korotaev <[email protected]>
2006-09-22[RTNETLINK]: Fix typo causing wrong skb to be freedThomas Graf1-1/+1
A typo introduced by myself which leads to freeing the skb containing the netlink message when it should free the newly allocated skb for the reply. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NETLINK]: Make use of NLA_STRING/NLA_NUL_STRING attribute validationThomas Graf2-12/+5
Converts existing NLA_STRING attributes to use the new validation features, saving a couple of temporary buffers. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Use SLAB_PANICAlexey Dobriyan3-20/+7
Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET] in6_pton: Kill errant printf statement.David S. Miller1-2/+0
Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Add common helper functions to convert IPv6/IPv4 address string to ↵YOSHIFUJI Hideaki1-0/+215
network address structure. These helpers can be used in netfilter, cifs etc. Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
2006-09-22[RTNETLINK]: Don't return error on no-metrics.David S. Miller1-2/+4
Instead just cancel the nested attribute and return 0. Signed-off-by: David S. Miller <[email protected]>
2006-09-22[IPv6] route: Convert FIB6 dumping to use new netlink apiThomas Graf1-13/+18
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET] neighbour: reduce exportsStephen Hemminger1-5/+1
There are several symbols only used by rtnetlink and since it can not be a module, there is no reason to export them. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET/IPV4/IPV6]: Change some sysctl variables to __read_mostlyBrian Haley2-6/+6
Change net/core, ipv4 and ipv6 sysctl variables to __read_mostly. Couldn't actually measure any performance increase while testing (.3% I consider noise), but seems like the right thing to do. Signed-off-by: Brian Haley <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[RTNETLINK]: Unexport rtnl socketThomas Graf1-3/+1
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET] link: Convert notifications to use rtnl_notify()Thomas Graf1-10/+12
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[WIRELESS]: Convert notifications to use rtnl_notify()Thomas Graf1-1/+2
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Convert neighbour notifications ot use rtnl_notify()Thomas Graf1-18/+17
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET] fib_rules: Convert fib rule notification to use rtnl_notify()Thomas Graf1-11/+21
Adds support for NLM_F_ECHO to simplify the process of identifying inserted rules with an auto generated priority. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[RTNETLINK]: Add rtnetlink notification interfaceThomas Graf1-0/+18
Adds rtnl_notify() to send rtnetlink notification messages and rtnl_set_sk_err() to report notification errors as socket errors in order to indicate the need of a resync due to loss of events. nlmsg_report() is added to properly document the meaning of NLM_F_ECHO. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[RTNETLINK]: Use rtnl_unicast() for rtnetlink unicastsThomas Graf1-3/+7
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET] netdev: Check name lengthStephen Hemminger1-1/+5
Some improvements to robust name interface. These API's are safe now by convention, but it is worth providing some safety checks against future bugs. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Introduce RTA_TABLE/FRA_TABLE attributesPatrick McHardy1-2/+3
Introduce RTA_TABLE route attribute and FRA_TABLE routing rule attribute to hold 32 bit routing table IDs. Usespace compatibility is provided by continuing to accept and send the rtm_table field, but because of its limited size it can only carry the low 8 bits of the table ID. This implies that if larger IDs are used, _all_ userspace programs using them need to use RTA_TABLE. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Remove unnecessary config.h includes from net/Dave Jones2-3/+1
config.h is automatically included by kbuild these days. Signed-off-by: Dave Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Move netlink neighbour table bits to linux/neighbour.hThomas Graf1-2/+0
rtnetlink_rcv_msg() is not longer required to parse attributes for the neighbour tables layer, remove dependency on obsolete and buggy rta_buf. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Convert neighbour table dumping to new netlink apiThomas Graf1-67/+74
Also fixes skipping of already dumped neighbours. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Convert neighbour table modification to new netlink apiThomas Graf1-68/+104
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Move netlink neighbour bits to linux/neighbour.hThomas Graf1-2/+0
Moves netlink neighbour bits to linux/neighbour.h. Also moves bits to be exported to userspace from net/neighbour.h to linux/neighbour.h and removes __KERNEL__ guards, userspace is not supposed to be using it. rtnetlink_rcv_msg() is not longer required to parse attributes for the neighbour layer, remove dependency on obsolete and buggy rta_buf. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Convert neighbour dumping to new netlink apiThomas Graf1-55/+51
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Convert neighbour addition to new netlink apiThomas Graf1-39/+51
Fixes: Return EAFNOSUPPORT if no table matches the specified address family. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NEIGH]: Convert neighbour deletion to new netlink apiThomas Graf1-19/+34
Fixes: Return ENOENT if the neighbour is not found (was EINVAL) Return EAFNOSUPPORT if no table matches the specified address family. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETEPatrick McHardy4-16/+16
Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose checksum still needs to be completed) and CHECKSUM_COMPLETE (for incoming packets, device supplied full checksum). Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Convert link dumping to new netlink apiThomas Graf1-144/+137
Transforms netlink code to dump link tables to use the new netlink api. Makes rtnl_getlink() available regardless of the availability of the wireless extensions. Adding copy_rtnl_link_stats() avoids the structural dependency of struct rtnl_link_stats on struct net_device_stats and thus avoids troubles later on. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Convert link modification to new netlink apiThomas Graf1-91/+100
Transforms do_setlink() into rtnl_setlink() using the new netlink api. A warning message printed to the console is added in the event that a change request fails while part of the change request has been comitted already. The ioctl() based nature of net devices makes it almost impossible to move on to atomic netlink operations without obsoleting some of the functionality. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[IPv4]: Move interface address bits to linux/if_addr.hThomas Graf1-0/+1
Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Protocol Independant Policy Routing Rules FrameworkThomas Graf3-2/+424
Derived from net/ipv/fib_rules.c Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[MLSXFRM]: Flow based matching of xfrm policy and stateVenkat Yekkirala1-5/+2
This implements a seemless mechanism for xfrm policy selection and state matching based on the flow sid. This also includes the necessary SELinux enforcement pieces. Signed-off-by: Venkat Yekkirala <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[MLSXFRM]: Add security sid to sockVenkat Yekkirala1-1/+1
This adds security for IP sockets at the sock level. Security at the sock level is needed to enforce the SELinux security policy for security associations even when a sock is orphaned (such as in the TCP LAST_ACK state). This will also be used to enforce SELinux controls over data arriving at or leaving a child socket while it's still waiting to be accepted. Signed-off-by: Venkat Yekkirala <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-19Merge branch 'master' into upstreamJeff Garzik1-0/+3
2006-09-17[NEIGH]: neigh_table_clear() doesn't free statsKirill Korotaev1-0/+3
neigh_table_clear() doesn't free tbl->stats. Found by Alexey Kuznetsov. Though Alexey considers this leak minor for mainstream, I still believe that cleanup code should not forget to free some of the resources :) At least, this is critical for OpenVZ with virtualized neighbour tables. Signed-Off-By: Kirill Korotaev <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-13[PATCH] ethtool: allow const ethtool_opsStephen Hemminger1-7/+7
The ethtool_ops structure is immutable, it expected to be setup by the driver and is never changed. This patch allows drivers to declare there ethtool_ops structure read-only. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2006-08-17[NET]: Disallow whitespace in network device names.David S. Miller1-5/+14
It causes way too much trouble and confusion in userspace. Signed-off-by: David S. Miller <[email protected]>
2006-08-17[NET]: Fix potential stack overflow in net/core/utils.cSuresh Siddha1-3/+4
On High end systems (1024 or so cpus) this can potentially cause stack overflow. Fix the stack usage. Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-08-17[VLAN]: Make sure bonding packet drop checks get done in hwaccel RX path.David S. Miller1-17/+1
Since __vlan_hwaccel_rx() is essentially bypassing the netif_receive_skb() call that would have occurred if we did the VLAN decapsulation in software, we are missing the skb_bond() call and the assosciated checks it does. Export those checks via an inline function, skb_bond_should_drop(), and use this in __vlan_hwaccel_rx(). Signed-off-by: David S. Miller <[email protected]>
2006-08-09Merge [email protected]:/pub/scm/linux/kernel/git/davem/net-2.6Greg Kroah-Hartman4-4/+22
2006-08-09[NET]: add_timer -> mod_timer() in dst_run_gc()Dmitry Mishin1-2/+1
Patch from Dmitry Mishin <[email protected]>: Replace add_timer() by mod_timer() in dst_run_gc in order to avoid BUG message. CPU1 CPU2 dst_run_gc() entered dst_run_gc() entered spin_lock(&dst_lock) ..... del_timer(&dst_gc_timer) fail to get lock .... mod_timer() <--- puts timer back to the list add_timer(&dst_gc_timer) <--- BUG because timer is in list already. Found during OpenVZ internal testing. At first we thought that it is OpenVZ specific as we added dst_run_gc(0) call in dst_dev_event(), but as Alexey pointed to me it is possible to trigger this condition in mainstream kernel. F.e. timer has fired on CPU2, but the handler was preeempted by an irq before dst_lock is tried. Meanwhile, someone on CPU1 adds an entry to gc list and starts the timer. If CPU2 was preempted long enough, this timer can expire simultaneously with resuming timer handler on CPU1, arriving exactly to the situation described. Signed-off-by: Dmitry Mishin <[email protected]> Signed-off-by: Kirill Korotaev <[email protected]> Signed-off-by: Alexey Kuznetsov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-08-08[RTNETLINK]: Fix IFLA_ADDRESS handling.David S. Miller1-1/+14
The ->set_mac_address handlers expect a pointer to a sockaddr which contains the MAC address, whereas IFLA_ADDRESS provides just the MAC address itself. So whip up a sockaddr to wrap around the netlink attribute for the ->set_mac_address call. Signed-off-by: David S. Miller <[email protected]>
2006-08-07[PKTGEN]: Make sure skb->{nh,h} are initialized in fill_packet_ipv6() too.David S. Miller1-0/+2
Mirror the bug fix from fill_packet_ipv4() Signed-off-by: David S. Miller <[email protected]>
2006-08-07[PKTGEN]: Fix oops when used with balance-tlb bondingChen-Li Tien1-0/+2
Signed-off-by: Chen-Li Tien <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-08-07[NET]: Assign skb->dev in netdev_alloc_skbChristoph Hellwig1-1/+3
Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: David S. Miller <[email protected]>