output.c (64526) | output.c (90868) |
---|---|
1/* 2 * Copyright (c) 1983, 1988, 1993 3 * The Regents of the University of California. 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 --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/* 2 * Copyright (c) 1983, 1988, 1993 3 * The Regents of the University of California. 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 --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sbin/routed/output.c 64131 2000-08-02 11:38:20Z sheldonh $ | 33 * $FreeBSD: head/sbin/routed/output.c 90868 2002-02-18 20:35:27Z mike $ |
34 */ 35 36#include "defs.h" 37 38#if !defined(sgi) && !defined(__NetBSD__) 39static char sccsid[] __attribute__((unused)) = "@(#)output.c 8.1 (Berkeley) 6/5/93"; 40#elif defined(__NetBSD__) 41__RCSID("$NetBSD$"); 42#endif | 34 */ 35 36#include "defs.h" 37 38#if !defined(sgi) && !defined(__NetBSD__) 39static char sccsid[] __attribute__((unused)) = "@(#)output.c 8.1 (Berkeley) 6/5/93"; 40#elif defined(__NetBSD__) 41__RCSID("$NetBSD$"); 42#endif |
43#ident "$FreeBSD: head/sbin/routed/output.c 64131 2000-08-02 11:38:20Z sheldonh $" | 43#ident "$FreeBSD: head/sbin/routed/output.c 90868 2002-02-18 20:35:27Z mike $" |
44 45 46u_int update_seqno; 47 48 49/* walk the tree of routes with this for output 50 */ 51struct { --- 362 unchanged lines hidden (view full) --- 414 wb->n->n_family = RIP_AF_INET; 415 wb->n->n_dst = htonl(dst_h); 416 /* If the route is from router-discovery or we are 417 * shutting down, admit only a bad metric. 418 */ 419 wb->n->n_metric = ((stopint || ag->ag_metric < 1) 420 ? HOPCNT_INFINITY 421 : ag->ag_metric); | 44 45 46u_int update_seqno; 47 48 49/* walk the tree of routes with this for output 50 */ 51struct { --- 362 unchanged lines hidden (view full) --- 414 wb->n->n_family = RIP_AF_INET; 415 wb->n->n_dst = htonl(dst_h); 416 /* If the route is from router-discovery or we are 417 * shutting down, admit only a bad metric. 418 */ 419 wb->n->n_metric = ((stopint || ag->ag_metric < 1) 420 ? HOPCNT_INFINITY 421 : ag->ag_metric); |
422 HTONL(wb->n->n_metric); | 422 wb->n->n_metric = htonl(wb->n->n_metric); |
423 /* Any non-zero bits in the supposedly unused RIPv1 fields 424 * cause the old `routed` to ignore the route. 425 * That means the mask and so forth cannot be sent 426 * in the hybrid RIPv1/RIPv2 mode. 427 */ 428 if (ws.state & WS_ST_RIP2_ALL) { 429 if (ag->ag_nhop != 0 430 && ((ws.state & WS_ST_QUERY) --- 545 unchanged lines hidden --- | 423 /* Any non-zero bits in the supposedly unused RIPv1 fields 424 * cause the old `routed` to ignore the route. 425 * That means the mask and so forth cannot be sent 426 * in the hybrid RIPv1/RIPv2 mode. 427 */ 428 if (ws.state & WS_ST_RIP2_ALL) { 429 if (ag->ag_nhop != 0 430 && ((ws.state & WS_ST_QUERY) --- 545 unchanged lines hidden --- |