summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* ndisc: Do not try to update "updated" time if neighbour has already gone.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-3/+3
| | | | | | | | | | | | Commit 2152caea ("ipv6: Do not depend on rt->n in rt6_probe().") introduce a bug to try to update "updated" time in neighbour structure. Update the "updated" time only if neighbour is available. Bug was found by Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* dsa: make dsa_switch_setup check for valid port namesFlorian Fainelli2013-01-211-0/+6
| | | | | | | | | This patch changes dsa_switch_setup() to ensure that at least one valid valid port name is specified and will bail out with an error in case we walked the maximum number of port with a valid port name found. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* dsa: use an unique and non conflicting bus name for the slave MII busFlorian Fainelli2013-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The slave MII bus registered by the DSA code is using the parent MII bus as part of its name (ds->master_mii_bus_id), in case the parent MII bus name is already 16 characters long (such as d0072004.mdio-mi) we will get the following WARN_ON in dsa_switch_setup() when calling mdiobus_register(): [ 79.088782] ------------[ cut here ]------------ [ 79.093448] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0x80/0xa0() [ 79.099831] sysfs: cannot create duplicate filename '/class/mdio_bus/d0072004.mdio-mi' This is a genuine warning, because the DSA slave MII bus will also be named d0072004.mdio-mi, and since MII_BUS_ID_SIZE is 17 characters long (with null-terminator) the following will truncate the slave MII bus id: snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "%s-%d:%.2x", ds->master_mii_bus->id, ds->pd->sw_addr); Fix this by using dsa-<switch index->:<sw_add> which is guaranteed to be unique. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: move rx and tx hash functions to net/core/flow_dissector.cCong Wang2013-01-212-175/+173
| | | | | | | | | | | | | | __skb_tx_hash() and __skb_get_rxhash() are all for calculating hash value based by some fields in skb, mostly used for selecting queues by device drivers. Meanwhile, net/core/dev.c is bloating. Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: split eth_mac_addr for better error handlingStefan Hajnoczi2013-01-211-6/+35
| | | | | | | | | | | | | | When we set mac address, software mac address in system and hardware mac address all need to be updated. Current eth_mac_addr() doesn't allow callers to implement error handling nicely. This patch split eth_mac_addr() to prepare part and real commit part, then we can prepare first, and try to change hardware address, then do the real commit if hardware address is set successfully. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mcast: add multicast proxy support (IPv4 and IPv6)Nicolas Dichtel2013-01-212-26/+219
| | | | | | | | | | | | | | | | | | This patch add the support of proxy multicast, ie being able to build a static multicast tree. It adds the support of (*,*) and (*,G) entries. The user should define an (*,*) entry which is not used for real forwarding. This entry defines the upstream in iif and contains all interfaces from the static tree in its oifs. It will be used to forward packet upstream when they come from an interface belonging to the static tree. Hence, the user should define (*,G) entries to build its static tree. Note that upstream interface must be part of oifs: packets are sent to all oifs interfaces except the input interface. This ensures to always join the whole static tree, even if the packet is not coming from the upstream interface. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Use compound literals to build redirect message.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-12/+8
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Break down ndisc_build_skb() and build message directly.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-59/+63
| | | | | | | Construct NS/NA/RS message directly using C99 compound literals. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Break down __ndisc_send().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-24/+21
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Fill in ICMPv6 checksum and IPv6 header in ndisc_send_skb().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-16/+8
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Use ndisc_send_skb() for redirect.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-23/+14
| | | | | | | Reuse dst if one is attached with skb. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Remove icmp6h argument from ndisc_send_skb().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-3/+3
| | | | | | | | skb_transport_header() (thus icmp6_hdr()) is available here, use it. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Make ndisc_fill_xxx_option() for sk_buff.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-18/+15
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Calculate message body length and option length separately.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-9/+11
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Reset skb->trasport_headner inside ndisc_alloc_send_skb().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-2/+1
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Defer building IPv6 header.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-11/+11
| | | | | | | | | Build ICMPv6 message first and make buffer management easier; we can use skb->len when filling checksum in ICMPv6 header, and then build IP header with length field. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Remove dev argument for ndisc_send_skb().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-5/+5
| | | | | | | Since we have skb->dev, use it. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Set skb->dev and skb->protocol inside ndisc_alloc_skb().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-6/+6
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Simplify arguments for ip6_nd_hdr().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-8/+7
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Unshare ip6_nd_hdr() and change return type to void.YOSHIFUJI Hideaki / 吉藤英明2013-01-213-35/+52
| | | | | | | | | - move ip6_nd_hdr() to its users' source files. In net/ipv6/mcast.c, it will be called ip6_mc_hdr(). - make return type to void since this function never fails. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Introduce ndisc_alloc_skb() helper.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-25/+27
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Introduce ndisc_fill_redirect_hdr_option().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-6/+15
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Use skb_linearize() instead of pskb_may_pull(skb, skb->len).YOSHIFUJI Hideaki / 吉藤英明2013-01-211-1/+1
| | | | | | | Suggested by Eric Dumazet <edumazet@google.com>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Move ndisc_opt_addr_space() to include/net/ndisc.h.YOSHIFUJI Hideaki / 吉藤英明2013-01-211-6/+1
| | | | | | | | This also makes ndisc_opt_addr_data() and ndisc_fill_addr_option() use ndisc_opt_addr_space(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Reduce number of arguments for ndisc_fill_addr_option().YOSHIFUJI Hideaki / 吉藤英明2013-01-211-7/+6
| | | | | | | | Add pointer to struct net_device (dev) and remove data_len (= dev->addr_len) and addr_type (= dev->type). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Make several arguments for ndisc_send_na() boolean.YOSHIFUJI Hideaki / 吉藤英明2013-01-201-5/+5
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Introduce ipv6_addr_is_solict_mult() to check Solicited Node Multicast ↵YOSHIFUJI Hideaki / 吉藤英明2013-01-201-5/+1
| | | | | | | Addresses. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* batman-adv: Start new development cycleAntonio Quartulli2013-01-191-1/+1
| | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: update copyright yearsAntonio Quartulli2013-01-1942-42/+42
| | | | | Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: postpone sysfs removal when unregisteringSimon Wunderlich2013-01-193-5/+57
| | | | | | | | | | | | | | When processing the unregister notify for a hard interface, removing the sysfs files may lead to a circular deadlock (rtnl mutex <-> s_active). To overcome this problem, postpone the sysfs removal in a worker. Reported-by: Sasha Levin <sasha.levin@oracle.com> Reported-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: rename random32() to prandom_u32()Akinobu Mita2013-01-191-2/+2
| | | | | | | | | | | | | | | Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Antonio Quartulli <ordex@autistici.org> Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: kernel doc for types.hMarek Lindner2013-01-191-66/+395
| | | | | | | Thanks to Sven Eckelmann and Simon Wunderlich for their support. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: rename batadv_claim struct to make clear it is used by blaMarek Lindner2013-01-192-21/+22
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: rename batadv_backbone_gw struct to make clear it is used by blaMarek Lindner2013-01-192-27/+29
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: rename batadv_recvlist_node struct to make clear it is used by visMarek Lindner2013-01-192-4/+4
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: rename batadv_if_list_entry struct to make clear it is used by visMarek Lindner2013-01-192-13/+14
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: group tt type definitions togetherMarek Lindner2013-01-191-25/+25
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: mark debug_log struct as bat_priv only structMarek Lindner2013-01-192-18/+20
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: align kernel doc properlyMarek Lindner2013-01-191-13/+12
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: a delayed_work has to be initialised onceAntonio Quartulli2013-01-196-44/+32
| | | | | | | | | | A delayed_work struct does not need to be initialized each every time before being enqueued. Therefore the INIT_DELAYED_WORK() macro should be used during the initialization process only. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* ipv6: remove unneeded check to pskb_may_pull in ipip6_rcvHannes Frederic Sowa2013-01-181-6/+1
| | | | | | | | This is already checked by the caller (tunnel64_rcv) and brings ipip6_rcv in line with ipip_rcv. Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ndisc: Check NS message length before access.YOSHIFUJI Hideaki / 吉藤英明2013-01-181-0/+5
| | | | | | | | Check message length before accessing "target" field, as we do for other types. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Remove unused neigh argument for icmp6_dst_alloc() and its callers.YOSHIFUJI Hideaki / 吉藤英明2013-01-183-13/+7
| | | | | | | Because of rt->n removal, we do not need neigh argument any more. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* 6lowpan: Handle uncompressed IPv6 packets over 6LoWPANAlan Ott2013-01-181-9/+32
| | | | | | | Handle the reception of uncompressed packets (dispatch type = IPv6). Signed-off-by: Alan Ott <alan@signal11.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* 6lowpan: Refactor packet delivery into a functionAlan Ott2013-01-181-14/+24
| | | | | | | | Refactor the handing of the skb's to the individual lowpan devices into a function. Signed-off-by: Alan Ott <alan@signal11.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Complete neighbour entry removal from dst_entry.YOSHIFUJI Hideaki / 吉藤英明2013-01-172-84/+1
| | | | | | CC: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Do not depend on rt->n in ip6_finish_output2().YOSHIFUJI Hideaki / 吉藤英明2013-01-171-5/+13
| | | | | | | If neigh is not found, create new one. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Do not depend on rt->n in ip6_dst_lookup_tail().YOSHIFUJI Hideaki / 吉藤英明2013-01-171-2/+6
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Do not depend on rt->n in rt6_probe().YOSHIFUJI Hideaki / 吉藤英明2013-01-171-10/+16
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Do not depend on rt->n in rt6_check_neigh().YOSHIFUJI Hideaki / 吉藤英明2013-01-171-5/+9
| | | | | | CC: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>