History log of /freebsd/sys/net/if_gre.c (Results 176 – 200 of 821)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 131c55bc 20-Jun-2008 Andrew Thompson <thompsa@FreeBSD.org>

Add support for the optional key in the GRE header.

PR: kern/114714
Submitted by: Cristian KLEIN


Revision tags: vendor/binutils/2.15.20040523, vendor/opensolaris/20080410
# 8b07e49a 09-May-2008 Julian Elischer <julian@FreeBSD.org>

Add code to allow the system to handle multiple routing tables.
This particular implementation is designed to be fully backwards compatible
and to be MFC-able to 7.x (and 6.x)

Currently the only pro

Add code to allow the system to handle multiple routing tables.
This particular implementation is designed to be fully backwards compatible
and to be MFC-able to 7.x (and 6.x)

Currently the only protocol that can make use of the multiple tables is IPv4
Similar functionality exists in OpenBSD and Linux.

From my notes:

-----

One thing where FreeBSD has been falling behind, and which by chance I
have some time to work on is "policy based routing", which allows
different
packet streams to be routed by more than just the destination address.

Constraints:
------------

I want to make some form of this available in the 6.x tree
(and by extension 7.x) , but FreeBSD in general needs it so I might as
well do it in -current and back port the portions I need.

One of the ways that this can be done is to have the ability to
instantiate multiple kernel routing tables (which I will now
refer to as "Forwarding Information Bases" or "FIBs" for political
correctness reasons). Which FIB a particular packet uses to make
the next hop decision can be decided by a number of mechanisms.
The policies these mechanisms implement are the "Policies" referred
to in "Policy based routing".

One of the constraints I have if I try to back port this work to
6.x is that it must be implemented as a EXTENSION to the existing
ABIs in 6.x so that third party applications do not need to be
recompiled in timespan of the branch.

This first version will not have some of the bells and whistles that
will come with later versions. It will, for example, be limited to 16
tables in the first commit.
Implementation method, Compatible version. (part 1)
-------------------------------
For this reason I have implemented a "sufficient subset" of a
multiple routing table solution in Perforce, and back-ported it
to 6.x. (also in Perforce though not always caught up with what I
have done in -current/P4). The subset allows a number of FIBs
to be defined at compile time (8 is sufficient for my purposes in 6.x)
and implements the changes needed to allow IPV4 to use them. I have not
done the changes for ipv6 simply because I do not need it, and I do not
have enough knowledge of ipv6 (e.g. neighbor discovery) needed to do it.

Other protocol families are left untouched and should there be
users with proprietary protocol families, they should continue to work
and be oblivious to the existence of the extra FIBs.

To understand how this is done, one must know that the current FIB
code starts everything off with a single dimensional array of
pointers to FIB head structures (One per protocol family), each of
which in turn points to the trie of routes available to that family.

The basic change in the ABI compatible version of the change is to
extent that array to be a 2 dimensional array, so that
instead of protocol family X looking at rt_tables[X] for the
table it needs, it looks at rt_tables[Y][X] when for all
protocol families except ipv4 Y is always 0.
Code that is unaware of the change always just sees the first row
of the table, which of course looks just like the one dimensional
array that existed before.

The entry points rtrequest(), rtalloc(), rtalloc1(), rtalloc_ign()
are all maintained, but refer only to the first row of the array,
so that existing callers in proprietary protocols can continue to
do the "right thing".
Some new entry points are added, for the exclusive use of ipv4 code
called in_rtrequest(), in_rtalloc(), in_rtalloc1() and in_rtalloc_ign(),
which have an extra argument which refers the code to the correct row.

In addition, there are some new entry points (currently called
rtalloc_fib() and friends) that check the Address family being
looked up and call either rtalloc() (and friends) if the protocol
is not IPv4 forcing the action to row 0 or to the appropriate row
if it IS IPv4 (and that info is available). These are for calling
from code that is not specific to any particular protocol. The way
these are implemented would change in the non ABI preserving code
to be added later.

One feature of the first version of the code is that for ipv4,
the interface routes show up automatically on all the FIBs, so
that no matter what FIB you select you always have the basic
direct attached hosts available to you. (rtinit() does this
automatically).

You CAN delete an interface route from one FIB should you want
to but by default it's there. ARP information is also available
in each FIB. It's assumed that the same machine would have the
same MAC address, regardless of which FIB you are using to get
to it.

This brings us as to how the correct FIB is selected for an outgoing
IPV4 packet.

Firstly, all packets have a FIB associated with them. if nothing
has been done to change it, it will be FIB 0. The FIB is changed
in the following ways.

Packets fall into one of a number of classes.

1/ locally generated packets, coming from a socket/PCB.
Such packets select a FIB from a number associated with the
socket/PCB. This in turn is inherited from the process,
but can be changed by a socket option. The process in turn
inherits it on fork. I have written a utility call setfib
that acts a bit like nice..

setfib -3 ping target.example.com # will use fib 3 for ping.

It is an obvious extension to make it a property of a jail
but I have not done so. It can be achieved by combining the setfib and
jail commands.

2/ packets received on an interface for forwarding.
By default these packets would use table 0,
(or possibly a number settable in a sysctl(not yet)).
but prior to routing the firewall can inspect them (see below).
(possibly in the future you may be able to associate a FIB
with packets received on an interface.. An ifconfig arg, but not yet.)

3/ packets inspected by a packet classifier, which can arbitrarily
associate a fib with it on a packet by packet basis.
A fib assigned to a packet by a packet classifier
(such as ipfw) would over-ride a fib associated by
a more default source. (such as cases 1 or 2).

4/ a tcp listen socket associated with a fib will generate
accept sockets that are associated with that same fib.

5/ Packets generated in response to some other packet (e.g. reset
or icmp packets). These should use the FIB associated with the
packet being reponded to.

6/ Packets generated during encapsulation.
gif, tun and other tunnel interfaces will encapsulate using the FIB
that was in effect withthe proces that set up the tunnel.
thus setfib 1 ifconfig gif0 [tunnel instructions]
will set the fib for the tunnel to use to be fib 1.

Routing messages would be associated with their
process, and thus select one FIB or another.
messages from the kernel would be associated with the fib they
refer to and would only be received by a routing socket associated
with that fib. (not yet implemented)

In addition Netstat has been edited to be able to cope with the
fact that the array is now 2 dimensional. (It looks in system
memory using libkvm (!)). Old versions of netstat see only the first FIB.

In addition two sysctls are added to give:
a) the number of FIBs compiled in (active)
b) the default FIB of the calling process.

Early testing experience:
-------------------------

Basically our (IronPort's) appliance does this functionality already
using ipfw fwd but that method has some drawbacks.

For example,
It can't fully simulate a routing table because it can't influence the
socket's choice of local address when a connect() is done.

Testing during the generating of these changes has been
remarkably smooth so far. Multiple tables have co-existed
with no notable side effects, and packets have been routes
accordingly.

ipfw has grown 2 new keywords:

setfib N ip from anay to any
count ip from any to any fib N

In pf there seems to be a requirement to be able to give symbolic names to the
fibs but I do not have that capacity. I am not sure if it is required.

SCTP has interestingly enough built in support for this, called VRFs
in Cisco parlance. it will be interesting to see how that handles it
when it suddenly actually does something.

Where to next:
--------------------

After committing the ABI compatible version and MFCing it, I'd
like to proceed in a forward direction in -current. this will
result in some roto-tilling in the routing code.

Firstly: the current code's idea of having a separate tree per
protocol family, all of the same format, and pointed to by the
1 dimensional array is a bit silly. Especially when one considers that
there is code that makes assumptions about every protocol having the
same internal structures there. Some protocols don't WANT that
sort of structure. (for example the whole idea of a netmask is foreign
to appletalk). This needs to be made opaque to the external code.

My suggested first change is to add routing method pointers to the
'domain' structure, along with information pointing the data.
instead of having an array of pointers to uniform structures,
there would be an array pointing to the 'domain' structures
for each protocol address domain (protocol family),
and the methods this reached would be called. The methods would have
an argument that gives FIB number, but the protocol would be free
to ignore it.

When the ABI can be changed it raises the possibilty of the
addition of a fib entry into the "struct route". Currently,
the structure contains the sockaddr of the desination, and the resulting
fib entry. To make this work fully, one could add a fib number
so that given an address and a fib, one can find the third element, the
fib entry.

Interaction with the ARP layer/ LL layer would need to be
revisited as well. Qing Li has been working on this already.

This work was sponsored by Ironport Systems/Cisco

Reviewed by: several including rwatson, bz and mlair (parts each)
Obtained from: Ironport systems/Cisco

show more ...


Revision tags: vendor/ncurses/5.6-20080503, vendor/expat/2.0.1, vendor/com_err/1.1.0, vendor/heimdal/1.1.0, vendor/opensolaris/20080410a, vendor/gcc/trunk_20080418-SVN134423, vendor/netcat/4.3, vendor/tzdata/tzdata2008b, vendor/bzip2/1.0.5
# 29481f88 19-Mar-2008 Julian Elischer <julian@FreeBSD.org>

Replace really convoluted code that simplifies to "a ^= 0x01;"


Revision tags: vendor/misc-GNU/cvs/1.11-20080310, vendor/tcsh/6.15b, vendor/tzdata/tzdata2008a, vendor/bsnmp/syrinx_20080307_bugfix, release/7.0.0_cvs, release/7.0.0, vendor/ncurses/5.6-20080209, vendor/file/4.23-r1.46, vendor/binutils/2.15.cvsrev_1_51, release/6.3.0_cvs, release/6.3.0, vendor/file/4.23, vendor/misc-GNU/cvs/1.11.22, vendor/tzdata/tzdata2007k, vendor/ncurses/5.6-20071222, vendor/openpam/HYDRANGEA, vendor/amd/6.1.5, vendor/tzdata/tzdata2007j, vendor/resolver/9.4.2, vendor/bind9/9.4.2, vendor/less/v416, vendor/less/v415, vendor/libreadline/5.2p3_p7, vendor/sendmail/8.14.2, vendor/tzdata/tzdata2007i, vendor/openbsm/1.0, vendor/one-true-awk/20071023, vendor/ipfilter/4.1.28, vendor/ipfilter-sys/4-1-28, vendor/openssl/0.9.8-20071018, vendor/tcpdump/3.9.8, vendor/libpcap/0.9.8, vendor/tcsh/6.15a, vendor/less/v409, vendor/tzdata/tzdata2007h, vendor/less/v408, vendor/tzdata/tzdata2007g, vendor/gcc/4.2.1-20070718-SVN126787, vendor/bind9/9.4.1p1, vendor/openbsm/1.0-ALPHA-15, vendor/wpa_supplicant/0.5.8, vendor/hostapd/0.5.8, vendor/pf/4.1, vendor/pf-sys/4.1
# cc9bdf2a 26-Jun-2007 Robert Watson <rwatson@FreeBSD.org>

Sync comments to code: we now use priv_check() rather than suser() to
determine privilege.

Approved by: re (bmah)


Revision tags: vendor/less/v406, vendor/misc-GNU/diff/2.8.7, vendor/bind9/9.4.1, vendor/one-true-awk/20070501, vendor/ipfilter/4.1.23, vendor/ipfilter-sys/4-1-23, vendor/less/v403, vendor/resolver/9.4.1, vendor/file/4.21, vendor/file/4.19, vendor/tzdata/tzdata2007f, vendor/gcc/4.2.0-20070514-SVN124707, vendor/openbsm/1.0-ALPHA-14, vendor/libreadline/5.2p2, vendor/sendmail/8.14.1, vendor/binutils/2.15.20050217, vendor/tcpdump/3.9.1a, vendor/tcsh/6.15p1, vendor/bzip2/1.0.4, vendor/netcat/4.1, vendor/acpica/20070320, vendor/openssl/0.9.8-20070315, vendor/openssl/0.9.8e, vendor/tcsh/6.15, vendor/bind9/9.3.4, vendor/ncurses/5.6-20061217, release/6.2.0_cvs, release/6.2.0, vendor/gdtoa/20050923, vendor/libreadline/5.2p1, vendor/libreadline/5.2, vendor/resolver/9.3.4, vendor/resolver/9.3.3, vendor/ath/0.9.20.3, vendor/bind9/9.3.3, vendor/pppd/2.3.11, vendor/openssh/4.5p1
# acd3428b 06-Nov-2006 Robert Watson <rwatson@FreeBSD.org>

Sweep kernel replacing suser(9) calls with priv(9) calls, assigning
specific privilege names to a broad range of privileges. These may
require some future tweaking.

Sponsored by: nCircle

Sweep kernel replacing suser(9) calls with priv(9) calls, assigning
specific privilege names to a broad range of privileges. These may
require some future tweaking.

Sponsored by: nCircle Network Security, Inc.
Obtained from: TrustedBSD Project
Discussed on: arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
Alex Lyashkov <umka at sevcity dot net>,
Skip Ford <skip dot ford at verizon dot net>,
Antoine Brodin <antoine dot brodin at laposte dot net>

show more ...


Revision tags: vendor/bind9/9.3.2p2, vendor/resolver/9.3.3RC2, vendor/tzdata/tzdata2006n, vendor/openssl/0.9.8-20060929, vendor/openssl/0.9.8d, vendor/openssh/4.4p1, vendor/openbsm/1.0-ALPHA-12, vendor/openbsm/1.0-ALPHA-11, vendor/bind9/9.3.2p1, vendor/tcpdump/3.9.4, vendor/libpcap/0.9.4, vendor/openbsm/1.0-ALPHA-10, vendor/openbsm/1.0-ALPHA9-kwikfix_backout, vendor/NetBSD/lukemftpd/20060831, vendor/openbsm/1.0-ALPHA9-kwikfix, vendor/gcc/3.4.6-20060825-SVN116475, vendor/openbsm/1.0-ALPHA-9, vendor/gdb/6.1.1, vendor/less/v394, vendor/sendmail/8.13.8, vendor/ipfilter/4.1.13, vendor/ipfilter-sys/4-1-13
# 43bc7a9c 04-Aug-2006 Brooks Davis <brooks@FreeBSD.org>

With exception of the if_name() macro, all definitions in net_osdep.h
were unused or already in if_var.h so add if_name() to if_var.h and
remove net_osdep.h along with all references to it.

Longer t

With exception of the if_name() macro, all definitions in net_osdep.h
were unused or already in if_var.h so add if_name() to if_var.h and
remove net_osdep.h along with all references to it.

Longer term we may want to kill off if_name() entierly since all modern
BSDs have if_xname variables rendering it unnecessicary.

show more ...


Revision tags: vendor/openssl/0.9.8b
# 6b7330e2 09-Jul-2006 Sam Leffler <sam@FreeBSD.org>

Revise network interface cloning to take an optional opaque
parameter that can specify configuration parameters:
o rev cloner api's to add optional parameter block
o add SIOCCREATE2 that accepts para

Revise network interface cloning to take an optional opaque
parameter that can specify configuration parameters:
o rev cloner api's to add optional parameter block
o add SIOCCREATE2 that accepts parameter data
o rev vlan support to use new api (maintain old code)

Reviewed by: arch@

show more ...


Revision tags: vendor/libuwx/BETA10, vendor/openbsm/1.0-ALPHA-7, vendor/OpenBSD/cvs_20060501, vendor/file/4.17a, vendor/file/4.17, vendor/sendmail/8.13.7, vendor/binutils/2.15.NOTHING, vendor/ath/0.9.17.2, vendor/openbsm/1.0-ALPHA-6
# 16d878cc 02-Jun-2006 Christian S.J. Peron <csjp@FreeBSD.org>

Fix the following bpf(4) race condition which can result in a panic:

(1) bpf peer attaches to interface netif0
(2) Packet is received by netif0
(3) ifp->if_bpf pointer is checked and handed off t

Fix the following bpf(4) race condition which can result in a panic:

(1) bpf peer attaches to interface netif0
(2) Packet is received by netif0
(3) ifp->if_bpf pointer is checked and handed off to bpf
(4) bpf peer detaches from netif0 resulting in ifp->if_bpf being
initialized to NULL.
(5) ifp->if_bpf is dereferenced by bpf machinery
(6) Kaboom

This race condition likely explains the various different kernel panics
reported around sending SIGINT to tcpdump or dhclient processes. But really
this race can result in kernel panics anywhere you have frequent bpf attach
and detach operations with high packet per second load.

Summary of changes:

- Remove the bpf interface's "driverp" member
- When we attach bpf interfaces, we now set the ifp->if_bpf member to the
bpf interface structure. Once this is done, ifp->if_bpf should never be
NULL. [1]
- Introduce bpf_peers_present function, an inline operation which will do
a lockless read bpf peer list associated with the interface. It should
be noted that the bpf code will pickup the bpf_interface lock before adding
or removing bpf peers. This should serialize the access to the bpf descriptor
list, removing the race.
- Expose the bpf_if structure in bpf.h so that the bpf_peers_present function
can use it. This also removes the struct bpf_if; hack that was there.
- Adjust all consumers of the raw if_bpf structure to use bpf_peers_present

Now what happens is:

(1) Packet is received by netif0
(2) Check to see if bpf descriptor list is empty
(3) Pickup the bpf interface lock
(4) Hand packet off to process

From the attach/detach side:

(1) Pickup the bpf interface lock
(2) Add/remove from bpf descriptor list

Now that we are storing the bpf interface structure with the ifnet, there is
is no need to walk the bpf interface list to locate the correct bpf interface.
We now simply look up the interface, and initialize the pointer. This has a
nice side effect of changing a bpf interface attach operation from O(N) (where
N is the number of bpf interfaces), to O(1).

[1] From now on, we can no longer check ifp->if_bpf to tell us whether or
not we have any bpf peers that might be interested in receiving packets.

In collaboration with: sam@
MFC after: 1 month

show more ...


Revision tags: release/5.5.0_cvs, release/5.5.0, vendor/netcat/3.9, vendor/resolver/9.3.2, vendor/tzdata/tzdata2006g
# a393a28a 11-May-2006 Jeffrey Hsu <hsu@FreeBSD.org>

Correct test for fragmented packet.


Revision tags: release/6.1.0_cvs, release/6.1.0, vendor/libreadline/5.1p1-p4, vendor/libreadline/5.1, vendor/zlib/1.2.3, vendor/openssh/4.3p1, vendor/sendmail/8.13.6, vendor/csup/20060313, vendor/hostapd/0.4.8, vendor/wpa_supplicant/0.4.8, vendor/openbsm/1.0-ALPHA-5, vendor/csup/20060303, vendor/csup/20060302, vendor/bsnmp/1.12, vendor/tcsh/6.14, vendor/openbsm/1.0-ALPHA-4, vendor/ath/0.9.16.16
# d03e5467 07-Feb-2006 Qing Li <qingli@FreeBSD.org>

Remove two unnecessary type casts, of which both had a typo in
it anyways.

Approved by: andre
MFC after: 3 days


Revision tags: vendor/openbsm/1.0-ALPHA-3, vendor/openbsm/1.0-ALPHA-2, vendor/openbsm/1.0-ALPHA-1
# 3f2e28fe 21-Jan-2006 Bjoern A. Zeeb <bz@FreeBSD.org>

Fix stack corruptions on amd64.

Vararg functions have a different calling convention than regular
functions on amd64. Casting a varag function to a regular one to
match the function pointer declarat

Fix stack corruptions on amd64.

Vararg functions have a different calling convention than regular
functions on amd64. Casting a varag function to a regular one to
match the function pointer declaration will hide the varargs from
the caller and we will end up with an incorrectly setup stack.

Entirely remove the varargs from these functions and change the
functions to match the declaration of the function pointers.
Remove the now unnecessary casts.

Lots of explanations and help from: peter
Reviewed by: peter
PR: amd64/89261
MFC after: 6 days

show more ...


Revision tags: vendor/bind9/9.3.2-dougb-p1, vendor/ipfilter/4.1.10, vendor/ipfilter-sys/4-1-10, vendor/bind9/9.3.2, vendor/tzdata/tzdata2005r, vendor/tzdata/tzdata2005q, vendor/nve/1.0.0310
# 303989a2 09-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Use sparse initializers for "struct domain" and "struct protosw",
so they are easier to follow for the human being.


# 4e7e0183 08-Nov-2005 Andrew Thompson <thompsa@FreeBSD.org>

Move the cloned interface list management in to if_clone. For some drivers the
softc lists and associated mutex are now unused so these have been removed.

Calling if_clone_detach() will now destroy

Move the cloned interface list management in to if_clone. For some drivers the
softc lists and associated mutex are now unused so these have been removed.

Calling if_clone_detach() will now destroy all the cloned interfaces for the
driver and in most cases is all thats needed to unload.

Idea by: brooks
Reviewed by: brooks

show more ...


Revision tags: release/6.0.0_cvs, release/6.0.0
# 34333b16 02-Nov-2005 Andre Oppermann <andre@FreeBSD.org>

Retire MT_HEADER mbuf type and change its users to use MT_DATA.

Having an additional MT_HEADER mbuf type is superfluous and redundant
as nothing depends on it. It only adds a layer of confusion. T

Retire MT_HEADER mbuf type and change its users to use MT_DATA.

Having an additional MT_HEADER mbuf type is superfluous and redundant
as nothing depends on it. It only adds a layer of confusion. The
distinction between header mbuf's and data mbuf's is solely done
through the m->m_flags M_PKTHDR flag.

Non-native code is not changed in this commit. For compatibility
MT_HEADER is mapped to MT_DATA.

Sponsored by: TCP/IP Optimization Fundraise 2005

show more ...


Revision tags: vendor/acpica/20051021, vendor/acpica/20041119sysinc, vendor/wpa_supplicant/0.3-latest, vendor/groff/1.19.2
# febd0759 12-Oct-2005 Andrew Thompson <thompsa@FreeBSD.org>

Change the reference counting to count the number of cloned interfaces for each
cloner. This ensures that ifc->ifc_units is not prematurely freed in
if_clone_detach() before the clones are destroyed,

Change the reference counting to count the number of cloned interfaces for each
cloner. This ensures that ifc->ifc_units is not prematurely freed in
if_clone_detach() before the clones are destroyed, resulting in memory modified
after free. This could be triggered with if_vlan.

Assert that all cloners have been destroyed when freeing the memory.

Change all simple cloners to destroy their clones with ifc_simple_destroy() on
module unload so the reference count is properly updated. This also cleans up
the interface destroy routines and allows future optimisation.

Discussed with: brooks, pjd, -current
Reviewed by: brooks

show more ...


Revision tags: vendor/wpa_supplicant/0.3.9, vendor/bsnmp/1.11, vendor/misc-GNU/cpio/2.6, vendor/pf-sys/3.7.001, vendor/openssh/4.2p1, vendor/tzdata/tzdata2005m, vendor/tzdata/tzdata2005l, vendor/bind9/9.3.1p1
# 13f4c340 09-Aug-2005 Robert Watson <rwatson@FreeBSD.org>

Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchron

Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.

Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.

Reviewed by: pjd, bz
MFC after: 7 days

show more ...


# 9e669156 01-Aug-2005 Bjoern A. Zeeb <bz@FreeBSD.org>

Add support for IPv6 over GRE [1]. PR kern/80340 includes the
FreeBSD specific ip_newid() changes NetBSD does not have.
Correct handling of non AF_INET packets passed to bpf [2].

PR: kern/80340[1

Add support for IPv6 over GRE [1]. PR kern/80340 includes the
FreeBSD specific ip_newid() changes NetBSD does not have.
Correct handling of non AF_INET packets passed to bpf [2].

PR: kern/80340[1], NetBSD PRs 29150[1], 30844[2]
Obtained from: NetBSD ip_gre.c rev. 1.34,1.35, if_gre.c rev. 1.56
Submitted by: Gert Doering <gert at greenie.muc.de>[2]
MFC after: 4 days

show more ...


Revision tags: vendor/tcpdump/3.9.1, vendor/libpcap/0.9.1
# 066b192e 28-Jun-2005 Bjoern A. Zeeb <bz@FreeBSD.org>

Fix panic after ifnet changes in rev. 1.30. sc->sc_ifp is a
pointer now and needs to be allocated before using.

Reviewed by: gnn
Approved by: re (scottl), rwatson (mentor)


# 01399f34 26-Jun-2005 David Malone <dwmalone@FreeBSD.org>

Fix some long standing bugs in writing to the BPF device attached to
a DLT_NULL interface. In particular:

1) Consistently use type u_int32_t for the header of a
DLT_NULL device -

Fix some long standing bugs in writing to the BPF device attached to
a DLT_NULL interface. In particular:

1) Consistently use type u_int32_t for the header of a
DLT_NULL device - it continues to represent the address
family as always.
2) In the DLT_NULL case get bpf_movein to store the u_int32_t
in a sockaddr rather than in the mbuf, to be consistent
with all the DLT types.
3) Consequently fix a bug in bpf_movein/bpfwrite which
only permitted packets up to 4 bytes less than the MTU
to be written.
4) Fix all DLT_NULL devices to have the code required to
allow writing to their bpf devices.
5) Move the code to allow writing to if_lo from if_simloop
to looutput, because it only applies to DLT_NULL devices
but was being applied to other devices that use if_simloop
possibly incorrectly.

PR: 82157
Submitted by: Matthew Luckie <mjl@luckie.org.nz>
Approved by: re (scottl)

show more ...


Revision tags: vendor/openpam/FIGWORT, vendor/sendmail/8.13.4_1, vendor/hostapd/0.3.9
# fc74a9f9 10-Jun-2005 Brooks Davis <brooks@FreeBSD.org>

Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a c

Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
- Struct arpcom is no longer referenced in normal interface code.
Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
To enforce this ac_enaddr has been renamed to _ac_enaddr.
- The second argument to ether_ifattach is now always the mac address
from driver private storage rather than sometimes being ac_enaddr.

Reviewed by: sobomax, sam

show more ...


Revision tags: vendor/sendmail/8.13.4, vendor/OpenBSD/dhclient_openbsd_3_7, vendor/hostapd/0.3.7, vendor/wpa_supplicant/0.3.8, vendor/openssh/4.1p1, vendor/openssh/4.0p1, vendor/gcc/3.4.4-20050518, vendor/tcpdump/3.9.1-096, vendor/libpcap/0.9.1-096, vendor/ngatm/1.2, vendor/bsnmp/1.10, vendor/misc-GNU/texinfo/4.8, vendor/NetBSD/lukemftp/20050516, vendor/tnftp/20050516, vendor/one-true-awk/20050424, vendor/bzip2/1.0.3, vendor/libregex/fedora-glibc-2.3.4-21, release/5.4.0_cvs, release/5.4.0, vendor/NetBSD/regress_resolv_20050504, vendor/pf/3.7, vendor/pf-sys/3.7, vendor/bsnmp/1.9, vendor/ipfilter/4.1.8, vendor/ipfilter-sys/4-1-8, vendor/zlib/1.2.2, vendor/bind9/9.3.1, vendor/nve/1.0.0301, vendor/bsnmp/1.8, vendor/openssl/0.9.7e, vendor/heimdal/0.6.3, vendor/NetBSD/lukemftp/20050219, vendor/tnftp/20050219, vendor/sendmail/8.13.3, vendor/netcat/20050204, vendor/openpam/FETERITA, release/4.11.0_cvs, release/4.11.0
# c398230b 07-Jan-2005 Warner Losh <imp@FreeBSD.org>

/* -> /*- for license, minor formatting changes


Revision tags: vendor/file/4.12, vendor/ath/0.9.14.9, vendor/tzdata/tzdata2004g, vendor/acpica/20041119, release/5.3.0_cvs, release/5.3.0, vendor/openssh/3.9p1, vendor/libreadline/5.0p1-p5, vendor/libreadline/5.0, vendor/tzdata/tzdata2004e, vendor/gcc/3.4.2-20041014, vendor/ngatm/1.1.1, vendor/libbegemot/1.1.1, vendor/bind9/9.3.0, vendor/bind9/9.3.0rc4, vendor/pf/3.5.001, vendor/NetBSD/lukemftpd/20040809, vendor/isc-dhcp/3.0.1, vendor/openssl/0.9.7-dev, vendor/pf-sys/3.5.004, vendor/pf-sys/3.5.003, vendor/misc-GNU/sort/20040812, vendor/gcc/3.4.2-20040728, vendor/ngatm/1.1, vendor/file/4.10, vendor/bsnmp/1.7
# 97c4cd98 05-Aug-2004 Maxim Sobolev <sobomax@FreeBSD.org>

Set ip_v field properly.

PR: kern/69957


Revision tags: vendor/sendmail/8.13.1, vendor/ntp/4.2.0, vendor/pf-sys/3.5.002
# 3e019dea 15-Jul-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Do a pass over all modules in the kernel and make them return EOPNOTSUPP
for unknown events.

A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taugh

Do a pass over all modules in the kernel and make them return EOPNOTSUPP
for unknown events.

A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".

show more ...


Revision tags: vendor/tcsh/6.13, vendor/ngatm/1.0, vendor/amd/6.0.10p1
# b3c9a01e 06-Jul-2004 Bruce M Simpson <bms@FreeBSD.org>

Use M_ZERO instead of memset() (!).


Revision tags: vendor/misc-GNU/grep/2.5.1, vendor/libregex/from-grep-2.5.1, vendor/misc-GNU/sort/5.2.1, vendor/acpica/20040527, vendor/zlib/1.2.1, vendor/isc-dhcp/3.0.1rc14, vendor/gdb/marcel_contrib
# f889d2ef 22-Jun-2004 Brooks Davis <brooks@FreeBSD.org>

Major overhaul of pseudo-interface cloning. Highlights include:

- Split the code out into if_clone.[ch].
- Locked struct if_clone. [1]
- Add a per-cloner match function rather then simply matchi

Major overhaul of pseudo-interface cloning. Highlights include:

- Split the code out into if_clone.[ch].
- Locked struct if_clone. [1]
- Add a per-cloner match function rather then simply matching names of
the form <name><unit> and <name>.
- Use the match function to allow creation of <interface>.<tag>
vlan interfaces. The old way is preserved unchanged!
- Also the match function to allow creation of stf(4) interfaces named
stf0, stf, or 6to4. This is the only major user visible change in
that "ifconfig stf" creates the interface stf rather then stf0 and
does not print "stf0" to stdout.
- Allow destroy functions to fail so they can refuse to delete
interfaces. Currently, we forbid the deletion of interfaces which
were created in the init function, particularly lo0, pflog0, and
pfsync0. In the case of lo0 this was a panic implementation so it
does not count as a user visiable change. :-)
- Since most interfaces do not need the new functionality, an family of
wrapper functions, ifc_simple_*(), were created to wrap old style
cloner functions.
- The IF_CLONE_INITIALIZER macro is replaced with a new incompatible
IFC_CLONE_INITIALIZER and ifc_simple consumers use IFC_SIMPLE_DECLARE
instead.

Submitted by: Maurycy Pawlowski-Wieronski <maurycy at fouk.org> [1]
Reviewed by: andre, mlaier
Discussed on: net

show more ...


12345678910>>...33