| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: if_spppsubr.c,v 1.113 2008/08/22 12:13:18 martin Exp $ */ | | 1 | /* $NetBSD: if_spppsubr.c,v 1.114 2008/10/03 18:33:06 pooka Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Synchronous PPP/Cisco link level subroutines. | | 4 | * Synchronous PPP/Cisco link level subroutines. |
5 | * Keepalive protocol implemented in both Cisco and PPP modes. | | 5 | * Keepalive protocol implemented in both Cisco and PPP modes. |
6 | * | | 6 | * |
7 | * Copyright (C) 1994-1996 Cronyx Engineering Ltd. | | 7 | * Copyright (C) 1994-1996 Cronyx Engineering Ltd. |
8 | * Author: Serge Vakulenko, <vak@cronyx.ru> | | 8 | * Author: Serge Vakulenko, <vak@cronyx.ru> |
9 | * | | 9 | * |
10 | * Heavily revamped to conform to RFC 1661. | | 10 | * Heavily revamped to conform to RFC 1661. |
11 | * Copyright (C) 1997, Joerg Wunsch. | | 11 | * Copyright (C) 1997, Joerg Wunsch. |
12 | * | | 12 | * |
13 | * RFC2472 IPv6CP support. | | 13 | * RFC2472 IPv6CP support. |
14 | * Copyright (C) 2000, Jun-ichiro itojun Hagino <itojun@iijlab.net>. | | 14 | * Copyright (C) 2000, Jun-ichiro itojun Hagino <itojun@iijlab.net>. |
| @@ -31,27 +31,27 @@ | | | @@ -31,27 +31,27 @@ |
31 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 31 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
32 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 32 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
33 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 33 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
34 | * POSSIBILITY OF SUCH DAMAGE. | | 34 | * POSSIBILITY OF SUCH DAMAGE. |
35 | * | | 35 | * |
36 | * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997 | | 36 | * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997 |
37 | * | | 37 | * |
38 | * From: if_spppsubr.c,v 1.39 1998/04/04 13:26:03 phk Exp | | 38 | * From: if_spppsubr.c,v 1.39 1998/04/04 13:26:03 phk Exp |
39 | * | | 39 | * |
40 | * From: Id: if_spppsubr.c,v 1.23 1999/02/23 14:47:50 hm Exp | | 40 | * From: Id: if_spppsubr.c,v 1.23 1999/02/23 14:47:50 hm Exp |
41 | */ | | 41 | */ |
42 | | | 42 | |
43 | #include <sys/cdefs.h> | | 43 | #include <sys/cdefs.h> |
44 | __KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.113 2008/08/22 12:13:18 martin Exp $"); | | 44 | __KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.114 2008/10/03 18:33:06 pooka Exp $"); |
45 | | | 45 | |
46 | #include "opt_inet.h" | | 46 | #include "opt_inet.h" |
47 | #include "opt_ipx.h" | | 47 | #include "opt_ipx.h" |
48 | #include "opt_iso.h" | | 48 | #include "opt_iso.h" |
49 | #include "opt_pfil_hooks.h" | | 49 | #include "opt_pfil_hooks.h" |
50 | | | 50 | |
51 | #include <sys/param.h> | | 51 | #include <sys/param.h> |
52 | #include <sys/proc.h> | | 52 | #include <sys/proc.h> |
53 | #include <sys/systm.h> | | 53 | #include <sys/systm.h> |
54 | #include <sys/kernel.h> | | 54 | #include <sys/kernel.h> |
55 | #include <sys/sockio.h> | | 55 | #include <sys/sockio.h> |
56 | #include <sys/socket.h> | | 56 | #include <sys/socket.h> |
57 | #include <sys/syslog.h> | | 57 | #include <sys/syslog.h> |
| @@ -3440,27 +3440,27 @@ sppp_ipv6cp_RCR(struct sppp *sp, struct | | | @@ -3440,27 +3440,27 @@ sppp_ipv6cp_RCR(struct sppp *sp, struct |
3440 | | | 3440 | |
3441 | if (!collision && !nohisaddr) { | | 3441 | if (!collision && !nohisaddr) { |
3442 | /* no collision, hisaddr known - Conf-Ack */ | | 3442 | /* no collision, hisaddr known - Conf-Ack */ |
3443 | type = CONF_ACK; | | 3443 | type = CONF_ACK; |
3444 | | | 3444 | |
3445 | if (debug) { | | 3445 | if (debug) { |
3446 | addlog(" %s [%s]", | | 3446 | addlog(" %s [%s]", |
3447 | ip6_sprintf(&desiredaddr), | | 3447 | ip6_sprintf(&desiredaddr), |
3448 | sppp_cp_type_name(type)); | | 3448 | sppp_cp_type_name(type)); |
3449 | } | | 3449 | } |
3450 | continue; | | 3450 | continue; |
3451 | } | | 3451 | } |
3452 | | | 3452 | |
3453 | memset(&suggestaddr, 0, sizeof(&suggestaddr)); | | 3453 | memset(&suggestaddr, 0, sizeof(suggestaddr)); |
3454 | if (collision && nohisaddr) { | | 3454 | if (collision && nohisaddr) { |
3455 | /* collision, hisaddr unknown - Conf-Rej */ | | 3455 | /* collision, hisaddr unknown - Conf-Rej */ |
3456 | type = CONF_REJ; | | 3456 | type = CONF_REJ; |
3457 | memset(&p[2], 0, 8); | | 3457 | memset(&p[2], 0, 8); |
3458 | } else { | | 3458 | } else { |
3459 | /* | | 3459 | /* |
3460 | * - no collision, hisaddr unknown, or | | 3460 | * - no collision, hisaddr unknown, or |
3461 | * - collision, hisaddr known | | 3461 | * - collision, hisaddr known |
3462 | * Conf-Nak, suggest hisaddr | | 3462 | * Conf-Nak, suggest hisaddr |
3463 | */ | | 3463 | */ |
3464 | type = CONF_NAK; | | 3464 | type = CONF_NAK; |
3465 | sppp_suggest_ip6_addr(sp, &suggestaddr); | | 3465 | sppp_suggest_ip6_addr(sp, &suggestaddr); |
3466 | bcopy(&suggestaddr.s6_addr[8], &p[2], 8); | | 3466 | bcopy(&suggestaddr.s6_addr[8], &p[2], 8); |