Deleted Added
full compact
if_gre.c (125020) if_gre.c (125024)
1/* $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */
1/* $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */
2/* $FreeBSD: head/sys/net/if_gre.c 125020 2004-01-26 12:21:59Z sobomax $ */
2/* $FreeBSD: head/sys/net/if_gre.c 125024 2004-01-26 12:33:56Z sobomax $ */
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Heiko W.Rupp <hwr@pilhuhn.de>
10 *

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

173 sc->sc_if.if_flags = IFF_POINTOPOINT|IFF_MULTICAST;
174 sc->sc_if.if_output = gre_output;
175 sc->sc_if.if_ioctl = gre_ioctl;
176 sc->g_dst.s_addr = sc->g_src.s_addr = INADDR_ANY;
177 sc->g_proto = IPPROTO_GRE;
178 sc->sc_if.if_flags |= IFF_LINK0;
179 sc->encap = NULL;
180 sc->called = 0;
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Heiko W.Rupp <hwr@pilhuhn.de>
10 *

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

173 sc->sc_if.if_flags = IFF_POINTOPOINT|IFF_MULTICAST;
174 sc->sc_if.if_output = gre_output;
175 sc->sc_if.if_ioctl = gre_ioctl;
176 sc->g_dst.s_addr = sc->g_src.s_addr = INADDR_ANY;
177 sc->g_proto = IPPROTO_GRE;
178 sc->sc_if.if_flags |= IFF_LINK0;
179 sc->encap = NULL;
180 sc->called = 0;
181 sc->wccp_ver = WCCP_V1;
181 if_attach(&sc->sc_if);
182 bpfattach(&sc->sc_if, DLT_NULL, sizeof(u_int32_t));
183 LIST_INSERT_HEAD(&gre_softc_list, sc, sc_list);
184 return (0);
185}
186
187static void
188gre_clone_destroy(ifp)

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

402 break;
403 case SIOCSIFFLAGS:
404 if ((error = suser(curthread)) != 0)
405 break;
406 if ((ifr->ifr_flags & IFF_LINK0) != 0)
407 sc->g_proto = IPPROTO_GRE;
408 else
409 sc->g_proto = IPPROTO_MOBILE;
182 if_attach(&sc->sc_if);
183 bpfattach(&sc->sc_if, DLT_NULL, sizeof(u_int32_t));
184 LIST_INSERT_HEAD(&gre_softc_list, sc, sc_list);
185 return (0);
186}
187
188static void
189gre_clone_destroy(ifp)

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

403 break;
404 case SIOCSIFFLAGS:
405 if ((error = suser(curthread)) != 0)
406 break;
407 if ((ifr->ifr_flags & IFF_LINK0) != 0)
408 sc->g_proto = IPPROTO_GRE;
409 else
410 sc->g_proto = IPPROTO_MOBILE;
411 if ((ifr->ifr_flags & IFF_LINK2) != 0)
412 sc->wccp_ver = WCCP_V2;
413 else
414 sc->wccp_ver = WCCP_V1;
410 goto recompute;
411 case SIOCSIFMTU:
412 if ((error = suser(curthread)) != 0)
413 break;
414 if (ifr->ifr_mtu < 576) {
415 error = EINVAL;
416 break;
417 }

--- 331 unchanged lines hidden ---
415 goto recompute;
416 case SIOCSIFMTU:
417 if ((error = suser(curthread)) != 0)
418 break;
419 if (ifr->ifr_mtu < 576) {
420 error = EINVAL;
421 break;
422 }

--- 331 unchanged lines hidden ---