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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090727144402.513369f1.akpm@linux-foundation.org>
Date:	Mon, 27 Jul 2009 14:44:02 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Chia-chi Yeh (_________) 
	<chiachi@...roid.com>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] net: Keep interface binding when sending packets with 
 ipi_ifindex = 0

(cc netdev)

On Thu, 23 Jul 2009 14:39:28 -0700
Chia-chi Yeh (_________) <chiachi@...roid.com> wrote:

> In IPv4, sending a packet with ipi_ifindex = 0 via an interface-bound
> socket will unbind the packet to that interface. This behavior is
> different from IPv6 which treats ipi6_ifindex = 0 as unspecified.
> Furthermore, IPv6 does not allow sending packets to other interface
> than the bound one, but I am not sure if it is necessary in IPv4. The
> following patch keeps the interface binding when ipi_ifindex = 0.
> 
> Thanks,
> Chia-chi
> 
> --- a/net/ipv4/ip_sockglue.c	2009-07-24 04:50:45.000000000 +0800
> +++ b/net/ipv4/ip_sockglue.c	2009-07-24 04:51:09.000000000 +0800
> @@ -213,7 +213,8 @@
>  			if (cmsg->cmsg_len != CMSG_LEN(sizeof(struct in_pktinfo)))
>  				return -EINVAL;
>  			info = (struct in_pktinfo *)CMSG_DATA(cmsg);
> -			ipc->oif = info->ipi_ifindex;
> +			if (info->ipi_ifindex)
> +				ipc->oif = info->ipi_ifindex;
>  			ipc->addr = info->ipi_spec_dst.s_addr;
>  			break;
>  		}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ