* [PATCH 1/2] IPV6: use ipv6_addr_any()
@ 2004-01-28 7:30 YOSHIFUJI Hideaki / 吉藤英明
2004-01-28 10:57 ` Pekka Savola
2004-01-29 0:06 ` David S. Miller
0 siblings, 2 replies; 4+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-28 7:30 UTC (permalink / raw)
To: davem; +Cc: netdev, yoshfuji
Hello.
Use simple ipv6_addr_any()
where ipv6_addr_type() is called only to check for unspecified address.
Thanks.
===== net/ipv6/af_inet6.c 1.60 vs edited =====
--- 1.60/net/ipv6/af_inet6.c Thu Jan 22 15:38:40 2004
+++ edited/net/ipv6/af_inet6.c Wed Jan 28 16:11:31 2004
@@ -464,7 +464,7 @@
if (np->sndflow)
sin->sin6_flowinfo = np->flow_label;
} else {
- if (ipv6_addr_type(&np->rcv_saddr) == IPV6_ADDR_ANY)
+ if (ipv6_addr_any(&np->rcv_saddr))
ipv6_addr_copy(&sin->sin6_addr, &np->saddr);
else
ipv6_addr_copy(&sin->sin6_addr, &np->rcv_saddr);
===== net/ipv6/ndisc.c 1.64 vs edited =====
--- 1.64/net/ipv6/ndisc.c Thu Jan 22 15:38:40 2004
+++ edited/net/ipv6/ndisc.c Wed Jan 28 16:13:21 2004
@@ -544,7 +544,7 @@
}
len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
- send_llinfo = dev->addr_len && ipv6_addr_type(saddr) != IPV6_ADDR_ANY;
+ send_llinfo = dev->addr_len && !ipv6_addr_any(saddr);
if (send_llinfo)
len += NDISC_OPT_SPACE(dev->addr_len);
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] IPV6: use ipv6_addr_any()
2004-01-28 7:30 [PATCH 1/2] IPV6: use ipv6_addr_any() YOSHIFUJI Hideaki / 吉藤英明
@ 2004-01-28 10:57 ` Pekka Savola
2004-01-28 11:29 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-29 0:06 ` David S. Miller
1 sibling, 1 reply; 4+ messages in thread
From: Pekka Savola @ 2004-01-28 10:57 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: davem, netdev
On Wed, 28 Jan 2004, YOSHIFUJI Hideaki / [iso-2022-jp] ^[$B5HF#1QL@^[(B wrote:
> Use simple ipv6_addr_any()
> where ipv6_addr_type() is called only to check for unspecified address.
Speakign of which, should it be better to change this to _unspecified
if we're changing this as one could be led to believe that "any"
refers to "any IPv6 address" which is obviously not the case.
> ===== net/ipv6/af_inet6.c 1.60 vs edited =====
> --- 1.60/net/ipv6/af_inet6.c Thu Jan 22 15:38:40 2004
> +++ edited/net/ipv6/af_inet6.c Wed Jan 28 16:11:31 2004
> @@ -464,7 +464,7 @@
> if (np->sndflow)
> sin->sin6_flowinfo = np->flow_label;
> } else {
> - if (ipv6_addr_type(&np->rcv_saddr) == IPV6_ADDR_ANY)
> + if (ipv6_addr_any(&np->rcv_saddr))
> ipv6_addr_copy(&sin->sin6_addr, &np->saddr);
> else
> ipv6_addr_copy(&sin->sin6_addr, &np->rcv_saddr);
> ===== net/ipv6/ndisc.c 1.64 vs edited =====
> --- 1.64/net/ipv6/ndisc.c Thu Jan 22 15:38:40 2004
> +++ edited/net/ipv6/ndisc.c Wed Jan 28 16:13:21 2004
> @@ -544,7 +544,7 @@
> }
>
> len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
> - send_llinfo = dev->addr_len && ipv6_addr_type(saddr) != IPV6_ADDR_ANY;
> + send_llinfo = dev->addr_len && !ipv6_addr_any(saddr);
> if (send_llinfo)
> len += NDISC_OPT_SPACE(dev->addr_len);
>
>
>
--
Pekka Savola "You each name yourselves king, yet the
Netcore Oy kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] IPV6: use ipv6_addr_any()
2004-01-28 10:57 ` Pekka Savola
@ 2004-01-28 11:29 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 0 replies; 4+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-28 11:29 UTC (permalink / raw)
To: pekkas; +Cc: davem, netdev, yoshfuji
In article <Pine.LNX.4.44.0401281256260.21205-100000@netcore.fi> (at Wed, 28 Jan 2004 12:57:27 +0200 (EET)), Pekka Savola <pekkas@netcore.fi> says:
> On Wed, 28 Jan 2004, YOSHIFUJI Hideaki / [iso-2022-jp] ^[$B5HF#1QL@^[(B wrote:
> > Use simple ipv6_addr_any()
> > where ipv6_addr_type() is called only to check for unspecified address.
>
> Speakign of which, should it be better to change this to _unspecified
> if we're changing this as one could be led to believe that "any"
> refers to "any IPv6 address" which is obviously not the case.
I don't think we need to change the name for now.
It however should be done by another patch
if it is better to be changed.
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] IPV6: use ipv6_addr_any()
2004-01-28 7:30 [PATCH 1/2] IPV6: use ipv6_addr_any() YOSHIFUJI Hideaki / 吉藤英明
2004-01-28 10:57 ` Pekka Savola
@ 2004-01-29 0:06 ` David S. Miller
1 sibling, 0 replies; 4+ messages in thread
From: David S. Miller @ 2004-01-29 0:06 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
On Wed, 28 Jan 2004 16:30:43 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
> Use simple ipv6_addr_any()
> where ipv6_addr_type() is called only to check for unspecified address.
Applied. Arigato Yoshfuji-san.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-29 0:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-28 7:30 [PATCH 1/2] IPV6: use ipv6_addr_any() YOSHIFUJI Hideaki / 吉藤英明
2004-01-28 10:57 ` Pekka Savola
2004-01-28 11:29 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-29 0:06 ` David S. 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).