summaryrefslogtreecommitdiff
path: root/sys/net/if.c
AgeCommit message (Collapse)Author
2004-01-15add a RTM_IFANNOUNCE message; from netbsd; ok itojun, henningMarkus Friedl
2004-01-09fix leak ether_deatch(): if if_free_sadl() is called before if_detach()Markus Friedl
then ifnet_addrs[ifp->if_index] leaks; if it's called after if_detach() then if_free_sadl() does nothing; ok itojun
2003-12-31Many improvements to the handling of interfaces in PF.Cedric Berger
1) PF should do the right thing when unplugging/replugging or cloning/ destroying NICs. 2) Rules can be loaded in the kernel for not-yet-existing devices (USB, PCMCIA, Cardbus). For example, it is valid to write: "pass in on kue0" before kue USB is plugged in. 3) It is possible to write rules that apply to group of interfaces (drivers), like "pass in on ppp all" 4) There is a new ":peer" modifier that completes the ":broadcast" and ":network" modifiers. 5) There is a new ":0" modifier that will filter out interface aliases. Can also be applied to DNS names to restore original PF behaviour. 6) The dynamic interface syntax (foo) has been vastly improved, and now support multiple addresses, v4 and v6 addresses, and all userland modifiers, like "pass in from (fxp0:network)" 7) Scrub rules now support the !if syntax. 8) States can be bound to the specific interface that created them or to a group of interfaces for example: - pass all keep state (if-bound) - pass all keep state (group-bound) - pass all keep state (floating) 9) The default value when only keep state is given can be selected by using the "set state-policy" statement. 10) "pfctl -ss" will now print the interface scope of the state. This diff change the pf_state structure slighltly, so you should recompile your userland tools (pfctl, authpf, pflogd, tcpdump...) Tested on i386, sparc, sparc64 by Ryan Tested on macppc, sparc64 by Daniel ok deraadt@ mcbride@
2003-12-16return error in ifc_destroy; ok deraadt, itojun, cedric, hshoexerMarkus Friedl
2003-12-10de-register. deraadt okJun-ichiro itojun Hagino
2003-12-10use if_indexlim (instead of if_index) and ifindex2ifnet[x] != NULLJun-ichiro itojun Hagino
to check if interface exists, as (1) if_index will have different meaning (2) ifindex2ifnet could become NULL when interface gets destroyed, when we introduce dynamically-created interfaces. markus ok
2003-12-08add IOCIFGCLONERS; ifconfig -C; from netbsd; ok henning, deraadtMarkus Friedl
2003-12-03support for network interface "cloning", e.g. gif(4) via ifconfig(8)Markus Friedl
2003-12-03protect against if_index wrap; similar to what netbsd does; ok henning deraadtMarkus Friedl
2003-11-06move netisr definition into md code to allow arch provide suitable ↵Michael Shalayeff
allocation; tested on most archs
2003-10-17Common Address Redundancy ProtocolRyan Thomas McBride
Allows multiple hosts to share an IP address, providing high availability and load balancing. Based on code by mickey@, with additional help from markus@ and Marco_Pfatschbacher@genua.de ok deraadt@
2003-10-01make ifindex2ifnet growing code more correct. (found by iij seil team)Jun-ichiro itojun Hagino
2003-08-27RNF_IGNORE can corrupt the radix tree when an interface is down, itHenric Jungheim
makes routing lookups slightly more expensive, and serves no useful purpose. ok itojun@ tedu@
2003-08-25if_init support, required by ieee80211.Federico G. Schwindt
deraadt@ ok.
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-07-23remove packets in queues (like ipintrq) with m->m_pkthdr.rcvif pointingJun-ichiro itojun Hagino
to detached if. deraadt ok
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-05-12Nuke a whole bunch of commons; ok tedu (still more to come *sigh*)Jason Wright
2002-09-11KNF - return is not a function.Jun-ichiro itojun Hagino
2002-07-03Change all variables definitions (int foo) in sys/sys/*.h to variableMiod Vallat
declarations (extern int foo), and compensate in the appropriate locations.
2002-06-30allocate sockaddr_dl for ifnet in if_alloc_sadl(), as we don't always knowJun-ichiro itojun Hagino
the size of sockaddr_dl on if_attach() - for instance, see ether_ifattach(). from netbsd. fgs ok
2002-06-11splassert(IPL_SOFTNET) where comment indicate that.Artur Grabowski
2002-06-08splnet -> splsoftnet where appropriateJun-ichiro itojun Hagino
2002-06-08more splnet protection to dom_ifattachJun-ichiro itojun Hagino
2002-06-08protect dom_ifattach by splnetJun-ichiro itojun Hagino
2002-05-30improve nd6_setmtu(), to warn too-small MTU on SIOCSIFMTU. sync w/kameJun-ichiro itojun Hagino
2002-05-29simplify comment, sync w/kameJun-ichiro itojun Hagino
2002-05-27if_attach() gets called before domaininit(). scan all interfaces for if_afdataJun-ichiro itojun Hagino
initialization after domaininit().
2002-05-27framework to add af-dependent data structure to struct ifnet.Jun-ichiro itojun Hagino
as discussed at bsd-api-discuss. sync w/kame
2002-04-24Initialize if_addrhooks in if_attachhead() like in if_attach(), eitherDaniel Hartmeier
one may be called.
2002-04-24Add hooks to struct ifnet that allow to register callbacks that will beDaniel Hartmeier
notified of interface address changes. ok provos@, angelos@
2002-03-14First round of __P removal in sysTodd C. Miller
2001-12-09Don't access the tq members directly, use the queue.h macros. Also,Jason Wright
convert several of the loops to TAILQ_FOREACH.
2001-06-29Move ifq_maxlen setting to if_attach(). Doing it at if_init() is wrong,Federico G. Schwindt
and has been wrong since PnP devices (pcmcia, carbus, etc) shown up. If you forgot to set ifq_maxlen somewhere in the driver, you're gonna see baaaad things; jason@ ok, angelos@ "should be ok" , theo "don't understand why".
2001-06-27ALTQ base modifications to the kernel.Kenjiro Cho
- ALTQ introduces a set of new queue macros that coexist with the traditional IF_XXX macros. - "struct ifaltq" replaces "struct ifqueue" in "struct ifnet". - assign cdev major 74 for i386 and 54 for alpha as ALTQ control interface.
2001-06-22KNFTheo de Raadt
2001-06-15change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.Jun-ichiro itojun Hagino
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific interfaces only). was: if_lastchange get updated on every packet transmission/receipt. now: if_lastchange get updated when IFF_UP is changed.
2001-06-08Move ifpromisc() from bpf.c to if.c, include cleanup.Angelos D. Keromytis
2001-05-30Remove ipf. Darren Reed has interpreted his (old, new, whichever)Theo de Raadt
licence in a way that makes ipf not free according to the rules we established over 5 years ago, at www.openbsd.org/goals.html (and those same basic rules govern the other *BSD projects too). Specifically, Darren says that modified versions are not permitted. But software which OpenBSD uses and redistributes must be free to all (be they people or companies), for any purpose they wish to use it, including modification, use, peeing on, or even integration into baby mulching machines or atomic bombs to be dropped on Australia. Furthermore, we know of a number of companies using ipf with modification like us, who are now in the same situation, and we hope that some of them will work with us to fill this gap that now exists in OpenBSD (temporarily, we hope).
2001-02-20provide SIOC[SG]LIFPHYADDR, which greatly simplify userland manipulation.Jun-ichiro itojun Hagino
sync with kame. old ioctls are kept but not really recommended.
2001-02-13When detaching an interface set the if_start, if_ioctl and if_watchdogArtur Grabowski
functions to 'nops'. Some protocols might want to output some packets while detaching and that could be a bad idea when the interface has gone away. Do we need to change more functions?
2001-01-30change ip_compat.h to ip_fil_compat.h for clarity. Impending ipf mergeKjell Wooding
2001-01-19pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).Jun-ichiro itojun Hagino
have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument. pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest. 3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr * (almost noone is using it anyways). benefit: the follwoing command now works. previously we need two route(8) invocations, "add" then "change". # route add -inet6 default ::1 -ifp gif0 remove unsafe typecast in rtrequest(), from rtentry * to sockaddr *. it was introduced by 4.3BSD-reno and never corrected. XXX is eon_rtrequest() change correct regarding to 3rd arg? eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno, so i do not have correct answer in the source code. someone with more clue about netiso-over-ip, please help.
2001-01-17IPF 3.4.15. (IPv6 not working yet).Federico G. Schwindt
Note: before building the userland part you need to do make includes.
2000-10-07repair SIOCGIFP*ADDR.Jun-ichiro itojun Hagino
2000-10-05there is no SIOCDIFPHYADDR in openbsd-current yet (in kame, there is)Jun-ichiro itojun Hagino
2000-10-04make sure we have root priv on SIOCSIFPHY*. from thorpej@netbsdJun-ichiro itojun Hagino
2000-06-20Convert if_slowtimo to use new timeouts.Artur Grabowski
2000-06-18increase my commit count by 1, because after telling niels three times that ↵Theo de Raadt
he has an indentation flaw, he has not fixed it, so i get a commit, thanks niels
2000-06-17fix commentsNiels Provos