* [resend] [PATCH] IPv4: Reset scope when changing address
@ 2008-02-16 11:45 Bjørn Mork
2008-02-18 6:22 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2008-02-16 11:45 UTC (permalink / raw)
To: netdev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1687 bytes --]
<#part type=text/plain nofile=yes>
Any comments on this? Apparently introduced in 2.1.68, so there's not
much hurry. But I'd still like to hear whether that analysis is correct
or not...
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==-=-="
The bug did bite at least one user, who did have to resort to rebooting
the system after an "ifconfig eth0 127.0.0.1" typo.
Deleting the address and adding a new is a less intrusive workaround.
But I still beleive this is a bug that should be fixed. Some way or
another.
Another possibility would be to remove the scope mangling based on
address. This will always be incomplete (are 127/8 the only address
space with host scope requirements?)
Bjørn
<#part type=text/x-diff filename="devinet-rt_scope-fix.patch" disposition=inline nofile=yes>
We set the scope to RT_SCOPE_HOST if an IPv4 interface is configured
with a loopback address (127/8). The scope is never reset, and will
remain set to RT_SCOPE_HOST after changing the address. This patch
resets the scope if the address is changed again, to restore normal
functionality.
Signed-off-by: Bjorn Mork <bjorn@mork.no>
--==-=-=
devinet.c | 1 +
1 file changed, 1 insertion(+)
--- linux-2.6.24-rc8.orig/net/ipv4/devinet.c 2008-01-16 05:22:48.000000000 +0100
+++ linux-2.6.24-rc8/net/ipv4/devinet.c 2008-01-23 19:17:30.000000000 +0100
@@ -753,6 +753,7 @@
inet_del_ifa(in_dev, ifap, 0);
ifa->ifa_broadcast = 0;
ifa->ifa_anycast = 0;
+ ifa->ifa_scope = 0;
}
ifa->ifa_address = ifa->ifa_local = sin->sin_addr.s_addr;
--==-=-=
Content-Type: text/plain; charset=iso-8859-1
--==-=-=--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [resend] [PATCH] IPv4: Reset scope when changing address
2008-02-16 11:45 [resend] [PATCH] IPv4: Reset scope when changing address Bjørn Mork
@ 2008-02-18 6:22 ` David Miller
2008-02-24 18:12 ` Bjørn Mork
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2008-02-18 6:22 UTC (permalink / raw)
To: bjorn; +Cc: netdev
From: Bjørn_Mork <bjorn@mork.no>
Date: Sat, 16 Feb 2008 12:45:31 +0100
> <#part type=text/plain nofile=yes>
> Any comments on this? Apparently introduced in 2.1.68, so there's not
> much hurry. But I'd still like to hear whether that analysis is correct
> or not...
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary="==-=-="
Please clear up all of the inline mime tag stuff in your
outgoing emails. Your description and patch is very difficult
to read because of this.
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [resend] [PATCH] IPv4: Reset scope when changing address
2008-02-18 6:22 ` David Miller
@ 2008-02-24 18:12 ` Bjørn Mork
2008-02-27 2:18 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2008-02-24 18:12 UTC (permalink / raw)
To: netdev
David Miller <davem@davemloft.net> writes:
> Please clear up all of the inline mime tag stuff in your
> outgoing emails. Your description and patch is very difficult
> to read because of this.
Ouch, sorry. I wish I could blame my user agent, but this was mostly my
sausage fingers..
New attempt:
This bug did bite at least one user, who did have to resort to rebooting
the system after an "ifconfig eth0 127.0.0.1" typo.
Deleting the address and adding a new is a less intrusive workaround.
But I still beleive this is a bug that should be fixed. Some way or
another.
Another possibility would be to remove the scope mangling based on
address. This will always be incomplete (are 127/8 the only address
space with host scope requirements?)
We set the scope to RT_SCOPE_HOST if an IPv4 interface is configured
with a loopback address (127/8). The scope is never reset, and will
remain set to RT_SCOPE_HOST after changing the address. This patch
resets the scope if the address is changed again, to restore normal
functionality.
Signed-off-by: Bjorn Mork <bjorn@mork.no>
---
devinet.c | 1 +
1 file changed, 1 insertion(+)
--- linux-2.6.24-rc8.orig/net/ipv4/devinet.c 2008-01-16 05:22:48.000000000 +0100
+++ linux-2.6.24-rc8/net/ipv4/devinet.c 2008-01-23 19:17:30.000000000 +0100
@@ -753,6 +753,7 @@
inet_del_ifa(in_dev, ifap, 0);
ifa->ifa_broadcast = 0;
ifa->ifa_anycast = 0;
+ ifa->ifa_scope = 0;
}
ifa->ifa_address = ifa->ifa_local = sin->sin_addr.s_addr;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [resend] [PATCH] IPv4: Reset scope when changing address
2008-02-24 18:12 ` Bjørn Mork
@ 2008-02-27 2:18 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-02-27 2:18 UTC (permalink / raw)
To: bjorn; +Cc: netdev
From: Bjørn_Mork <bjorn@mork.no>
Date: Sun, 24 Feb 2008 19:12:38 +0100
> We set the scope to RT_SCOPE_HOST if an IPv4 interface is configured
> with a loopback address (127/8). The scope is never reset, and will
> remain set to RT_SCOPE_HOST after changing the address. This patch
> resets the scope if the address is changed again, to restore normal
> functionality.
>
> Signed-off-by: Bjorn Mork <bjorn@mork.no>
This patch looks fine, applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-27 2:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 11:45 [resend] [PATCH] IPv4: Reset scope when changing address Bjørn Mork
2008-02-18 6:22 ` David Miller
2008-02-24 18:12 ` Bjørn Mork
2008-02-27 2:18 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).