Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys
Module Name: src
Committed By: dyoung
Date: Fri Nov 7 00:20:18 UTC 2008
Modified Files:
src/sys/altq: altq_afmap.c
src/sys/arch/acorn32/podulebus: if_ie.c
src/sys/arch/alpha/a12: if_ade.c if_xb.c
src/sys/arch/amiga/dev: if_ed.c if_es.c if_qn.c
src/sys/arch/mac68k/dev: if_mc.c
src/sys/arch/mac68k/nubus: if_netdock_nubus.c
src/sys/arch/macppc/dev: am79c950.c if_bm.c if_gm.c
src/sys/arch/mips/atheros/dev: if_ae.c
src/sys/arch/mips/sibyte/dev: sbmac.c
src/sys/arch/newsmips/apbus: if_sn.c
src/sys/arch/next68k/dev: mb8795.c
src/sys/arch/sun2/dev: if_ec.c
src/sys/arch/sun3/dev: if_ie.c
src/sys/dev/bi: if_ni.c
src/sys/dev/ic: an.c ath.c atw.c awi.c dp8390.c elinkxl.c gem.c
hd64570.c hme.c i82586.c lance.c lemac.c mb86950.c mb86960.c
midway.c pdq_ifsubr.c rrunner.c rt2560.c rt2661.c rtw.c sgec.c
smc90cx6.c smc91cxx.c tropic.c tulip.c wi.c
src/sys/dev/ieee1394: if_fwip.c
src/sys/dev/if_ndis: if_ndis.c
src/sys/dev/isa: if_eg.c if_el.c if_hp.c if_iy.c
src/sys/dev/marvell: if_gfe.c
src/sys/dev/ofw: ofnet.c
src/sys/dev/pci: cxgb_main.c if_bge.c if_de.c if_dge.c if_ipw.c
if_iwi.c if_iwn.c if_lmc.c if_nfe.c if_sip.c if_sk.c if_ti.c
if_txp.c if_vge.c if_wpi.c
src/sys/dev/pcmcia: if_cnw.c if_ray.c if_xi.c
src/sys/dev/ppbus: if_plip.c
src/sys/dev/qbus: if_dmc.c if_qe.c
src/sys/dev/sbus: be.c qe.c
src/sys/dev/scsipi: if_se.c
src/sys/dev/usb: if_aue.c if_axe.c if_cdce.c if_cue.c if_kue.c if_rum.c
if_upl.c if_ural.c if_zyd.c
src/sys/dist/pf/net: if_pflog.c
src/sys/net: if.c if.h if_arcsubr.c if_bridge.c if_ecosubr.c if_ether.h
if_etherip.c if_ethersubr.c if_faith.c if_fddisubr.c if_gif.c
if_gre.c if_hippisubr.c if_ieee1394subr.c if_loop.c if_ppp.c
if_sl.c if_spppsubr.c if_srt.c if_stf.c if_strip.c if_tap.c
if_tokensubr.c if_tun.c if_vlan.c link_proto.c route.c route.h
rtsock.c
src/sys/net/agr: if_agr.c
src/sys/net80211: ieee80211_ioctl.c
src/sys/netatalk: at_control.c
src/sys/netinet: if_arp.c in.c in_gif.c ip_carp.c
src/sys/netinet6: in6.c in6_gif.c in6_ifattach.c mld6.c nd6.c
src/sys/netisdn: i4b_ipr.c
src/sys/netiso: if_eon.c iso.c iso_snpac.c
src/sys/netnatm: natm.c
Log Message:
*** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.
Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)
Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.
Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.
Return consistent, appropriate error codes from network drivers.
Improve readability. KNF.
*** Details ***
In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.
In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.
Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.
In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.
Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:
switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}
Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,
switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}
unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).
In ipw(4), remove an if_set_sadl() call that is out of place.
In nfe(4), reuse the jumbo MTU logic in ether_ioctl().
Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.
Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.
Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.
Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.
In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.
Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.
In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.
Let ifioctl_common() handle SIOCGIFADDR.
Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.
In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.
bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
To generate a diff of this commit:
cvs rdiff -r1.18 -r1.19 src/sys/altq/altq_afmap.c
cvs rdiff -r1.19 -r1.20 src/sys/arch/acorn32/podulebus/if_ie.c
cvs rdiff -r1.33 -r1.34 src/sys/arch/alpha/a12/if_ade.c
cvs rdiff -r1.18 -r1.19 src/sys/arch/alpha/a12/if_xb.c
cvs rdiff -r1.55 -r1.56 src/sys/arch/amiga/dev/if_ed.c
cvs rdiff -r1.42 -r1.43 src/sys/arch/amiga/dev/if_es.c
cvs rdiff -r1.31 -r1.32 src/sys/arch/amiga/dev/if_qn.c
cvs rdiff -r1.34 -r1.35 src/sys/arch/mac68k/dev/if_mc.c
cvs rdiff -r1.18 -r1.19 src/sys/arch/mac68k/nubus/if_netdock_nubus.c
cvs rdiff -r1.23 -r1.24 src/sys/arch/macppc/dev/am79c950.c
cvs rdiff -r1.37 -r1.38 src/sys/arch/macppc/dev/if_bm.c
cvs rdiff -r1.33 -r1.34 src/sys/arch/macppc/dev/if_gm.c
cvs rdiff -r1.14 -r1.15 src/sys/arch/mips/atheros/dev/if_ae.c
cvs rdiff -r1.28 -r1.29 src/sys/arch/mips/sibyte/dev/sbmac.c
cvs rdiff -r1.30 -r1.31 src/sys/arch/newsmips/apbus/if_sn.c
cvs rdiff -r1.42 -r1.43 src/sys/arch/next68k/dev/mb8795.c
cvs rdiff -r1.15 -r1.16 src/sys/arch/sun2/dev/if_ec.c
cvs rdiff -r1.51 -r1.52 src/sys/arch/sun3/dev/if_ie.c
cvs rdiff -r1.36 -r1.37 src/sys/dev/bi/if_ni.c
cvs rdiff -r1.52 -r1.53 src/sys/dev/ic/an.c src/sys/dev/ic/pdq_ifsubr.c
cvs rdiff -r1.102 -r1.103 src/sys/dev/ic/ath.c
cvs rdiff -r1.140 -r1.141 src/sys/dev/ic/atw.c
cvs rdiff -r1.80 -r1.81 src/sys/dev/ic/awi.c
cvs rdiff -r1.68 -r1.69 src/sys/dev/ic/dp8390.c
cvs rdiff -r1.105 -r1.106 src/sys/dev/ic/elinkxl.c
cvs rdiff -r1.78 -r1.79 src/sys/dev/ic/gem.c
cvs rdiff -r1.39 -r1.40 src/sys/dev/ic/hd64570.c
cvs rdiff -r1.66 -r1.67 src/sys/dev/ic/hme.c
cvs rdiff -r1.62 -r1.63 src/sys/dev/ic/i82586.c
cvs rdiff -r1.41 -r1.42 src/sys/dev/ic/lance.c
cvs rdiff -r1.35 -r1.36 src/sys/dev/ic/lemac.c src/sys/dev/ic/sgec.c
cvs rdiff -r1.11 -r1.12 src/sys/dev/ic/mb86950.c
cvs rdiff -r1.70 -r1.71 src/sys/dev/ic/mb86960.c src/sys/dev/ic/smc91cxx.c
cvs rdiff -r1.82 -r1.83 src/sys/dev/ic/midway.c
cvs rdiff -r1.67 -r1.68 src/sys/dev/ic/rrunner.c
cvs rdiff -r1.19 -r1.20 src/sys/dev/ic/rt2560.c
cvs rdiff -r1.24 -r1.25 src/sys/dev/ic/rt2661.c
cvs rdiff -r1.104 -r1.105 src/sys/dev/ic/rtw.c
cvs rdiff -r1.56 -r1.57 src/sys/dev/ic/smc90cx6.c
cvs rdiff -r1.34 -r1.35 src/sys/dev/ic/tropic.c
cvs rdiff -r1.163 -r1.164 src/sys/dev/ic/tulip.c
cvs rdiff -r1.226 -r1.227 src/sys/dev/ic/wi.c
cvs rdiff -r1.15 -r1.16 src/sys/dev/ieee1394/if_fwip.c
cvs rdiff -r1.18 -r1.19 src/sys/dev/if_ndis/if_ndis.c
cvs rdiff -r1.76 -r1.77 src/sys/dev/isa/if_eg.c
cvs rdiff -r1.80 -r1.81 src/sys/dev/isa/if_el.c src/sys/dev/isa/if_iy.c
cvs rdiff -r1.44 -r1.45 src/sys/dev/isa/if_hp.c
cvs rdiff -r1.30 -r1.31 src/sys/dev/marvell/if_gfe.c
cvs rdiff -r1.41 -r1.42 src/sys/dev/ofw/ofnet.c
cvs rdiff -r1.11 -r1.12 src/sys/dev/pci/cxgb_main.c
cvs rdiff -r1.152 -r1.153 src/sys/dev/pci/if_bge.c
cvs rdiff -r1.128 -r1.129 src/sys/dev/pci/if_de.c
cvs rdiff -r1.21 -r1.22 src/sys/dev/pci/if_dge.c
cvs rdiff -r1.42 -r1.43 src/sys/dev/pci/if_ipw.c
cvs rdiff -r1.74 -r1.75 src/sys/dev/pci/if_iwi.c
cvs rdiff -r1.24 -r1.25 src/sys/dev/pci/if_iwn.c
cvs rdiff -r1.43 -r1.44 src/sys/dev/pci/if_lmc.c
cvs rdiff -r1.36 -r1.37 src/sys/dev/pci/if_nfe.c
cvs rdiff -r1.134 -r1.135 src/sys/dev/pci/if_sip.c
cvs rdiff -r1.54 -r1.55 src/sys/dev/pci/if_sk.c
cvs rdiff -r1.81 -r1.82 src/sys/dev/pci/if_ti.c
cvs rdiff -r1.26 -r1.27 src/sys/dev/pci/if_txp.c
cvs rdiff -r1.41 -r1.42 src/sys/dev/pci/if_vge.c
cvs rdiff -r1.39 -r1.40 src/sys/dev/pci/if_wpi.c
cvs rdiff -r1.44 -r1.45 src/sys/dev/pcmcia/if_cnw.c
cvs rdiff -r1.70 -r1.71 src/sys/dev/pcmcia/if_ray.c
cvs rdiff -r1.64 -r1.65 src/sys/dev/pcmcia/if_xi.c
cvs rdiff -r1.21 -r1.22 src/sys/dev/ppbus/if_plip.c
cvs rdiff -r1.16 -r1.17 src/sys/dev/qbus/if_dmc.c
cvs rdiff -r1.67 -r1.68 src/sys/dev/qbus/if_qe.c
cvs rdiff -r1.59 -r1.60 src/sys/dev/sbus/be.c
cvs rdiff -r1.45 -r1.46 src/sys/dev/sbus/qe.c
cvs rdiff -r1.72 -r1.73 src/sys/dev/scsipi/if_se.c
cvs rdiff -r1.111 -r1.112 src/sys/dev/usb/if_aue.c
cvs rdiff -r1.25 -r1.26 src/sys/dev/usb/if_axe.c
cvs rdiff -r1.18 -r1.19 src/sys/dev/usb/if_cdce.c
cvs rdiff -r1.53 -r1.54 src/sys/dev/usb/if_cue.c
cvs rdiff -r1.63 -r1.64 src/sys/dev/usb/if_kue.c
cvs rdiff -r1.23 -r1.24 src/sys/dev/usb/if_rum.c
cvs rdiff -r1.32 -r1.33 src/sys/dev/usb/if_upl.c
cvs rdiff -r1.30 -r1.31 src/sys/dev/usb/if_ural.c
cvs rdiff -r1.14 -r1.15 src/sys/dev/usb/if_zyd.c
cvs rdiff -r1.12 -r1.13 src/sys/dist/pf/net/if_pflog.c
cvs rdiff -r1.230 -r1.231 src/sys/net/if.c
cvs rdiff -r1.140 -r1.141 src/sys/net/if.h
cvs rdiff -r1.59 -r1.60 src/sys/net/if_arcsubr.c
cvs rdiff -r1.62 -r1.63 src/sys/net/if_bridge.c
cvs rdiff -r1.28 -r1.29 src/sys/net/if_ecosubr.c
cvs rdiff -r1.53 -r1.54 src/sys/net/if_ether.h
cvs rdiff -r1.24 -r1.25 src/sys/net/if_etherip.c
cvs rdiff -r1.169 -r1.170 src/sys/net/if_ethersubr.c
cvs rdiff -r1.44 -r1.45 src/sys/net/if_faith.c
cvs rdiff -r1.76 -r1.77 src/sys/net/if_fddisubr.c
cvs rdiff -r1.75 -r1.76 src/sys/net/if_gif.c
cvs rdiff -r1.138 -r1.139 src/sys/net/if_gre.c
cvs rdiff -r1.34 -r1.35 src/sys/net/if_hippisubr.c
cvs rdiff -r1.40 -r1.41 src/sys/net/if_ieee1394subr.c
cvs rdiff -r1.69 -r1.70 src/sys/net/if_loop.c
cvs rdiff -r1.123 -r1.124 src/sys/net/if_ppp.c
cvs rdiff -r1.112 -r1.113 src/sys/net/if_sl.c
cvs rdiff -r1.114 -r1.115 src/sys/net/if_spppsubr.c
cvs rdiff -r1.8 -r1.9 src/sys/net/if_srt.c
cvs rdiff -r1.67 -r1.68 src/sys/net/if_stf.c
cvs rdiff -r1.87 -r1.88 src/sys/net/if_strip.c
cvs rdiff -r1.49 -r1.50 src/sys/net/if_tap.c
cvs rdiff -r1.54 -r1.55 src/sys/net/if_tokensubr.c
cvs rdiff -r1.107 -r1.108 src/sys/net/if_tun.c
cvs rdiff -r1.60 -r1.61 src/sys/net/if_vlan.c
cvs rdiff -r1.4 -r1.5 src/sys/net/link_proto.c
cvs rdiff -r1.113 -r1.114 src/sys/net/route.c
cvs rdiff -r1.70 -r1.71 src/sys/net/route.h
cvs rdiff -r1.115 -r1.116 src/sys/net/rtsock.c
cvs rdiff -r1.21 -r1.22 src/sys/net/agr/if_agr.c
cvs rdiff -r1.49 -r1.50 src/sys/net80211/ieee80211_ioctl.c
cvs rdiff -r1.26 -r1.27 src/sys/netatalk/at_control.c
cvs rdiff -r1.143 -r1.144 src/sys/netinet/if_arp.c
cvs rdiff -r1.127 -r1.128 src/sys/netinet/in.c
cvs rdiff -r1.59 -r1.60 src/sys/netinet/in_gif.c
cvs rdiff -r1.26 -r1.27 src/sys/netinet/ip_carp.c
cvs rdiff -r1.141 -r1.142 src/sys/netinet6/in6.c
cvs rdiff -r1.56 -r1.57 src/sys/netinet6/in6_gif.c
cvs rdiff -r1.80 -r1.81 src/sys/netinet6/in6_ifattach.c
cvs rdiff -r1.47 -r1.48 src/sys/netinet6/mld6.c
cvs rdiff -r1.130 -r1.131 src/sys/netinet6/nd6.c
cvs rdiff -r1.29 -r1.30 src/sys/netisdn/i4b_ipr.c
cvs rdiff -r1.68 -r1.69 src/sys/netiso/if_eon.c
cvs rdiff -r1.50 -r1.51 src/sys/netiso/iso.c
cvs rdiff -r1.51 -r1.52 src/sys/netiso/iso_snpac.c
cvs rdiff -r1.16 -r1.17 src/sys/netnatm/natm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index