Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2008-01-08 Thread David Miller
From: David Stevens [EMAIL PROTECTED] Date: Mon, 7 Jan 2008 17:18:56 -0800 Acked-by: David L Stevens [EMAIL PROTECTED] Patch applied, thanks everyone. -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2008-01-07 Thread Brian Haley
David Stevens wrote: Yeah, that's what I get for typing in off-the-cuff code. What I was thinking was the fl.oif assignment instead was: if (!sk-sk_bound_dev_if (addr_type IPV6_ADDR_MULTICAST)) sk-sk_bound_dev_if = np-mcast_oif; Which it

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2008-01-07 Thread David Stevens
Brian, Looks good to me. +-DLS Acked-by: David L Stevens [EMAIL PROTECTED] How about the simple patch below? I just removed the ENINVAL check from my original patch, but it accomplishes the same thing. ... Signed-off-by: Brian Haley [EMAIL PROTECTED]

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread Vlad Yasevich
Daven David Stevens wrote: Brian, OK, I see what you're trying to fix now. I think the scope_id checks are not quite right-- they should be something like this: if (addr_typeIPV6_ADDR_LINKLOCAL) { if (addr_len = sizeof(struct sockaddr_in6)) { if

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread Brian Haley
Hi David, David Stevens wrote: OK, I see what you're trying to fix now. I think the scope_id checks are not quite right-- they should be something like this: if (addr_typeIPV6_ADDR_LINKLOCAL) { if (addr_len = sizeof(struct sockaddr_in6)) { if (sk-sk_bound_dev_if

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread David Stevens
Vlad Yasevich [EMAIL PROTECTED] wrote on 12/19/2007 07:20:53 AM: But this still requires either a SO_BINDTODEVICE or sin6_scope_id. This means the an application can call BINDTODEVICE(eth0), MULTICAST_IF(eth1) issue a connect on a UDP socket an succeed? Seems wrong to me. Can you check

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread David Stevens
Brian Haley [EMAIL PROTECTED] wrote on 12/19/2007 07:35:46 AM: ... if (usin-sin6_scope_id) sk-sk_bound_dev_if = usin-sin6_scope_id; if (!sk-sk_bound_dev_if (addr_type IPV6_ADDR_MULTICAST))

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread Vlad Yasevich
David Stevens wrote: Vlad Yasevich [EMAIL PROTECTED] wrote on 12/19/2007 07:20:53 AM: But this still requires either a SO_BINDTODEVICE or sin6_scope_id. This means the an application can call BINDTODEVICE(eth0), MULTICAST_IF(eth1) issue a connect on a UDP socket an succeed? Seems wrong to

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread Brian Haley
David Stevens wrote: Vlad Yasevich [EMAIL PROTECTED] wrote on 12/19/2007 07:20:53 AM: But this still requires either a SO_BINDTODEVICE or sin6_scope_id. This means the an application can call BINDTODEVICE(eth0), MULTICAST_IF(eth1) issue a connect on a UDP socket an succeed? Seems wrong to

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread Brian Haley
David Stevens wrote: Brian Haley [EMAIL PROTECTED] wrote on 12/19/2007 07:35:46 AM: ... if (usin-sin6_scope_id) sk-sk_bound_dev_if = usin-sin6_scope_id; if (!sk-sk_bound_dev_if (addr_type IPV6_ADDR_MULTICAST))

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-19 Thread David Stevens
We would still have to check np-mcast_oif is set in the link-local case since we shouldn't be getting here with a zero. Actually, that's one of the things I wanted to look into. I'm not sure if there's a path through here with (even non-linklocal) multicasts that end up without an

[PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-18 Thread Brian Haley
Trying to connect() to an IPv6 link-local multicast address by specifying the outgoing multicast interface doesn't work, you have to bind to a device first with an SO_BINDTODEVICE setsockopt() call. This patch allows the IPV6_MULTICAST_IF setting to also control which interface should be used

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-18 Thread David Stevens
Brian Haley [EMAIL PROTECTED] wrote on 12/18/2007 12:57:54 PM: Trying to connect() to an IPv6 link-local multicast address by specifying the outgoing multicast interface doesn't work, you have to bind to a device first with an SO_BINDTODEVICE setsockopt() call. No, you simply have to

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-18 Thread Brian Haley
David Stevens wrote: Brian Haley [EMAIL PROTECTED] wrote on 12/18/2007 12:57:54 PM: Trying to connect() to an IPv6 link-local multicast address by specifying the outgoing multicast interface doesn't work, you have to bind to a device first with an SO_BINDTODEVICE setsockopt() call. Other

Re: [PATCH] [IPv6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

2007-12-18 Thread David Stevens
Brian, OK, I see what you're trying to fix now. I think the scope_id checks are not quite right-- they should be something like this: if (addr_typeIPV6_ADDR_LINKLOCAL) { if (addr_len = sizeof(struct sockaddr_in6)) { if (sk-sk_bound_dev_if usin-sin6_scope_id