lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 13 Nov 2014 23:19:47 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Mahesh Bandewar <maheshb@...gle.com>
Cc:	netdev <netdev@...r.kernel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	Maciej Zenczykowski <maze@...gle.com>,
	Laurent Chavey <chavey@...gle.com>,
	Tim Hockin <thockin@...gle.com>,
	David Miller <davem@...emloft.net>,
	Brandon Philips <brandon.philips@...eos.com>,
	Pavel Emelianov <xemul@...allels.com>
Subject: Re: [PATCH net-next v1] ipvlan: Initial check-in of the IPVLAN
 driver.

On Thu, 2014-11-13 at 22:29 -0800, Mahesh Bandewar wrote:

> +static int ipvlan_xmit_mode_l2(struct sk_buff *skb, struct net_device *dev)
> +{
> +	const struct ipvl_dev *ipvlan = netdev_priv(dev);
> +	struct ethhdr *eth = eth_hdr(skb);
> +	struct ipvl_addr *addr = NULL;
> +	void *lyr3h = NULL;
> +	int addr_type;
> +
> +	ipvlan_dbg(4, "L2:Xmit on dev %s,PROT=%x\n", dev->name,
> +		   ntohs(skb->protocol));
> +	if (ether_addr_equal(eth->h_dest, eth->h_source)) {
> +		ipvlan_dbg(4, "Comm betn 2 virt devs PROT=%x\n",
> +			   ntohs(skb->protocol));
> +		if ((lyr3h = ipvlan_get_L3_hdr(skb, &addr_type)) == NULL)
> +			goto to_default;
> +
> +		addr = ipvlan_addr_lookup(ipvlan->port, lyr3h, addr_type, true);
> +		if (addr)
> +			return ipvlan_rcv_frame(addr, skb, true);
> +
> +		/* No matching ipvlan dev! Must be on the Physical device */
> +to_default:
> +		skb = skb_share_check(skb, GFP_ATOMIC);
> +		if (!skb)
> +			return RX_HANDLER_CONSUMED;

Same problem here. RX_HANDLER_CONSUMED makes no sense.

> +
> +		/* Packet definitely does not belong to any of the
> +		 * virtual devices, but the dest is local. So forward
> +		 * the skb for the main-dev. At the RX side we just return
> +		 * RX_PASS for it to be processed further on the stack.
> +		 */
> +		return dev_forward_skb(ipvlan->phy_dev, skb);
> +
> +	} else if (is_multicast_ether_addr(eth->h_dest)) {
> +		u8 ip_summed = skb->ip_summed;
> +		/* Packet needs to be multicast-ed. */
> +		skb->ip_summed = CHECKSUM_UNNECESSARY;
> +		ipvlan_dbg(4, "%s[%d] Mcast Xmit on [%s], PROT=[%x]\n",
> +			   __func__, __LINE__, dev->name,
> +			   ntohs(skb->protocol));
> +		ipvlan_multicast_frame(ipvlan->port, skb, ipvlan, true);
> +		skb->ip_summed = ip_summed;
> +	}
> +
> +	/* Send it out */
> +	skb->dev = ipvlan->phy_dev;
> +	return dev_queue_xmit(skb);
> +}
> +



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists