nd6.c (1829d5da5355930d5cfa8ec8add8ff47dc0bebab) nd6.c (e27b0c87759d9d7a6eebca60bc82f171fbf36afc)
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 360 unchanged lines hidden (view full) ---

369
370 while (1) {
371 nd_opt = nd6_option(ndopts);
372 if (nd_opt == NULL && ndopts->nd_opts_last == NULL) {
373 /*
374 * Message validation requires that all included
375 * options have a length that is greater than zero.
376 */
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 360 unchanged lines hidden (view full) ---

369
370 while (1) {
371 nd_opt = nd6_option(ndopts);
372 if (nd_opt == NULL && ndopts->nd_opts_last == NULL) {
373 /*
374 * Message validation requires that all included
375 * options have a length that is greater than zero.
376 */
377 V_icmp6stat.icp6s_nd_badopt++;
377 ICMP6STAT_INC(icp6s_nd_badopt);
378 bzero(ndopts, sizeof(*ndopts));
379 return -1;
380 }
381
382 if (nd_opt == NULL)
383 goto skip1;
384
385 switch (nd_opt->nd_opt_type) {

--- 27 unchanged lines hidden (view full) ---

413 nd6log((LOG_DEBUG,
414 "nd6_options: unsupported option %d - "
415 "option ignored\n", nd_opt->nd_opt_type));
416 }
417
418skip1:
419 i++;
420 if (i > V_nd6_maxndopt) {
378 bzero(ndopts, sizeof(*ndopts));
379 return -1;
380 }
381
382 if (nd_opt == NULL)
383 goto skip1;
384
385 switch (nd_opt->nd_opt_type) {

--- 27 unchanged lines hidden (view full) ---

413 nd6log((LOG_DEBUG,
414 "nd6_options: unsupported option %d - "
415 "option ignored\n", nd_opt->nd_opt_type));
416 }
417
418skip1:
419 i++;
420 if (i > V_nd6_maxndopt) {
421 V_icmp6stat.icp6s_nd_toomanyopt++;
421 ICMP6STAT_INC(icp6s_nd_toomanyopt);
422 nd6log((LOG_INFO, "too many loop in nd opt\n"));
423 break;
424 }
425
426 if (ndopts->nd_opts_done)
427 break;
428 }
429

--- 1804 unchanged lines hidden ---
422 nd6log((LOG_INFO, "too many loop in nd opt\n"));
423 break;
424 }
425
426 if (ndopts->nd_opts_done)
427 break;
428 }
429

--- 1804 unchanged lines hidden ---