Deleted Added
full compact
route.c (245168) route.c (246143)
1/*
2 * Copyright (c) 1983, 1989, 1991, 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

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

35
36#ifndef lint
37#if 0
38static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
39#endif
40#endif /* not lint */
41
42#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1983, 1989, 1991, 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

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

35
36#ifndef lint
37#if 0
38static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
39#endif
40#endif /* not lint */
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sbin/route/route.c 245168 2013-01-08 17:24:43Z hrs $");
43__FBSDID("$FreeBSD: head/sbin/route/route.c 246143 2013-01-31 08:55:21Z glebius $");
44
45#include <sys/param.h>
46#include <sys/file.h>
47#include <sys/socket.h>
48#include <sys/ioctl.h>
49#include <sys/sysctl.h>
50#include <sys/types.h>
51#include <sys/queue.h>

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

81union sockunion {
82 struct sockaddr sa;
83 struct sockaddr_in sin;
84#ifdef INET6
85 struct sockaddr_in6 sin6;
86#endif
87 struct sockaddr_at sat;
88 struct sockaddr_dl sdl;
44
45#include <sys/param.h>
46#include <sys/file.h>
47#include <sys/socket.h>
48#include <sys/ioctl.h>
49#include <sys/sysctl.h>
50#include <sys/types.h>
51#include <sys/queue.h>

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

81union sockunion {
82 struct sockaddr sa;
83 struct sockaddr_in sin;
84#ifdef INET6
85 struct sockaddr_in6 sin6;
86#endif
87 struct sockaddr_at sat;
88 struct sockaddr_dl sdl;
89 struct sockaddr_inarp sinarp;
90 struct sockaddr_storage ss; /* added to avoid memory overrun */
91} so_dst, so_gate, so_mask, so_genmask, so_ifa, so_ifp;
92
93typedef union sockunion *sup;
94int pid, rtm_addrs;
95int s;
96int forcehost, forcenet, doflush, nflag, af, qflag, tflag;
97int verbose, aflen = sizeof (struct sockaddr_in);

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

918 }
919 if (nrflags & F_FORCENET)
920 nrflags &= ~F_ISHOST;
921 flags |= RTF_UP;
922 if (nrflags & F_ISHOST)
923 flags |= RTF_HOST;
924 if ((nrflags & F_INTERFACE) == 0)
925 flags |= RTF_GATEWAY;
89 struct sockaddr_storage ss; /* added to avoid memory overrun */
90} so_dst, so_gate, so_mask, so_genmask, so_ifa, so_ifp;
91
92typedef union sockunion *sup;
93int pid, rtm_addrs;
94int s;
95int forcehost, forcenet, doflush, nflag, af, qflag, tflag;
96int verbose, aflen = sizeof (struct sockaddr_in);

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

917 }
918 if (nrflags & F_FORCENET)
919 nrflags &= ~F_ISHOST;
920 flags |= RTF_UP;
921 if (nrflags & F_ISHOST)
922 flags |= RTF_HOST;
923 if ((nrflags & F_INTERFACE) == 0)
924 flags |= RTF_GATEWAY;
926 if (nrflags & F_PROXY) {
927 so_dst.sinarp.sin_other = SIN_PROXY;
925 if (nrflags & F_PROXY)
928 flags |= RTF_ANNOUNCE;
926 flags |= RTF_ANNOUNCE;
929 }
930 if (dest == NULL)
931 dest = "";
932 if (gateway == NULL)
933 gateway = "";
934
935 if (TAILQ_EMPTY(&fibl_head)) {
936 error = fiboptlist_csv("default", &fibl_head);
937 if (error)

--- 1006 unchanged lines hidden ---
927 if (dest == NULL)
928 dest = "";
929 if (gateway == NULL)
930 gateway = "";
931
932 if (TAILQ_EMPTY(&fibl_head)) {
933 error = fiboptlist_csv("default", &fibl_head);
934 if (error)

--- 1006 unchanged lines hidden ---