diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-08-20 21:50:57 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-08-20 21:50:57 +0000 |
commit | 3f911a3d005ea3d7df897f81c411539c8dd0fcce (patch) | |
tree | c2d0711332d569ccd9fa71e05636ed972ab8069a /sys/netinet6/in6_pcb.c | |
parent | cfca99796ee42b5742a3e87cc07ff6d4dd5ff675 (diff) |
more comment on bind(deprecated) handling
Diffstat (limited to 'sys/netinet6/in6_pcb.c')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index c3186b48dc7..1249e11ba8d 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_pcb.c,v 1.29 2002/06/09 00:22:24 itojun Exp $ */ +/* $OpenBSD: in6_pcb.c,v 1.30 2002/08/20 21:50:56 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -247,10 +247,17 @@ in6_pcbbind(inp, nam) return EADDRNOTAVAIL; /* - * XXX: bind to an anycast address might accidentally - * cause sending a packet with anycast source address. - * We should allow to bind to a deprecated address, since - * the application dare to use it. + * bind to an anycast address might accidentally + * cause sending a packet with an anycast source + * address, so we forbid it. + * + * We should allow to bind to a deprecated address, + * since the application dare to use it. + * But, can we assume that they are careful enough + * to check if the address is deprecated or not? + * Maybe, as a safeguard, we should have a setsockopt + * flag to control the bind(2) behavior against + * deprecated addresses (default: forbid bind(2)). */ if (ia && ((struct in6_ifaddr *)ia)->ia6_flags & |