The NetBSD Project

CVS log for src/sys/netinet/if_arp.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / netinet

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.317: download - view: text, markup, annotated - select for diffs
Wed Nov 13 09:25:52 2024 UTC (2 months, 1 week ago) by roy
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +13 -9 lines
ARP/ND6: Revert prior

Turns out some people actually use this behaviour and strictly speaking
it is allowed by RFC5227 2.4 where it says:

   At any time, if a host receives
   an ARP packet (Request *or* Reply) where the 'sender IP address' is
   (one of) the host's own IP address(es) configured on that interface,
   but the 'sender hardware address' does not match any of the host's
   own interface addresses, then this is a conflicting ARP packet

The key part is "any of the host's own interface addreses".

Revision 1.316: download - view: text, markup, annotated - select for diffs
Fri Oct 4 23:31:06 2024 UTC (3 months, 3 weeks ago) by roy
Branches: MAIN
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +9 -11 lines
ARP: only ignore messages from the receving interface

This means that you can no longer share the same IP addresses
on different interfaces connected to the same subnet.
This was a very non standard solution and you can now
get the same functionality by using lagg(4) instead.

While here, flip log movements sysctl back to 1.

This reverts r1.253 and r1.286.

Revision 1.311.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 13 14:17:26 2024 UTC (4 months, 1 week ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE
Diff to: previous 1.311.2.2: preferred, colored; branchpoint 1.311: preferred, colored; next MAIN 1.312: preferred, colored
Changes since revision 1.311.2.2: +13 -2 lines
Pull up following revision(s) (requested by ozaki-r in ticket #859):

	tests/net/arp/t_arp.sh: revision 1.47
	tests/net/arp/t_arp.sh: revision 1.48
	sys/netinet/if_arp.c: revision 1.315

arp: allow to send packets without an ARP resolution just after
receiving an ARP request

On receiving an ARP request, the current implemention creates an ARP
cache entry but with ND_LLINFO_NOSTATE.  Such an entry still needs
an ARP resolution to send back a packet to the requester.  The original
behavior before introducing the common ND framework didn't need the
resolution.  IPv6 doesn't as well.  To restore the original behavior,
make a new ARP cache entry with ND_LLINFO_STALE like IPv6 does.

tests: dedup t_arp.sh like others (NFC)

tests: add tests for ARP cache entry creations

Revision 1.315: download - view: text, markup, annotated - select for diffs
Mon Sep 9 07:25:32 2024 UTC (4 months, 2 weeks ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +13 -2 lines
arp: allow to send packets without an ARP resolution just after receiving an ARP request

On receiving an ARP request, the current implemention creates an ARP
cache entry but with ND_LLINFO_NOSTATE.  Such an entry still needs
an ARP resolution to send back a packet to the requester.  The original
behavior before introducing the common ND framework didn't need the
resolution.  IPv6 doesn't as well.  To restore the original behavior,
make a new ARP cache entry with ND_LLINFO_STALE like IPv6 does.

Revision 1.282.2.7: download - view: text, markup, annotated - select for diffs
Sat Aug 24 16:46:35 2024 UTC (5 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.282.2.6: preferred, colored; branchpoint 1.282: preferred, colored; next MAIN 1.283: preferred, colored
Changes since revision 1.282.2.6: +16 -4 lines
Pull up following revision(s) (requested by ozaki-r in ticket #1883):

	tests/net/arp/t_dad.sh: revision 1.16
	sys/netinet/in.c: revision 1.248
	tests/net/arp/t_arp.sh: revision 1.46
	sys/netinet/if_arp.c: revision 1.314

arp: fix the behavior on detecting an address duplication without IPv4 DAD

On receiving an ARP request that has the same source protocol address as
the own address, i.e., address duplication, the original behavior of
a kernel prior to supporing IPv4 DAD is to send an ARP reply.   It is
the same with a latest kernel with DAD enabled.  However, a latest
kernel without DAD sends back an GARP packet.  Restore the original
behavior.

inet: send GARP on link up if DAD is disabled

This behavior was accidentally removed at rev 1.233.

tests, arp: add tests of address duplications without DAD

tests, arp: add tests for GARP on link up

Revision 1.311.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 24 16:45:05 2024 UTC (5 months ago) by martin
Branches: netbsd-10
Diff to: previous 1.311.2.1: preferred, colored; branchpoint 1.311: preferred, colored
Changes since revision 1.311.2.1: +16 -4 lines
Pull up following revision(s) (requested by ozaki-r in ticket #812):

	tests/net/arp/t_dad.sh: revision 1.16
	sys/netinet/in.c: revision 1.248
	tests/net/arp/t_arp.sh: revision 1.46
	sys/netinet/if_arp.c: revision 1.314

arp: fix the behavior on detecting an address duplication without IPv4 DAD

On receiving an ARP request that has the same source protocol address as
the own address, i.e., address duplication, the original behavior of
a kernel prior to supporing IPv4 DAD is to send an ARP reply.   It is
the same with a latest kernel with DAD enabled.  However, a latest
kernel without DAD sends back an GARP packet.  Restore the original
behavior.

inet: send GARP on link up if DAD is disabled

This behavior was accidentally removed at rev 1.233.

tests, arp: add tests of address duplications without DAD

tests, arp: add tests for GARP on link up

Revision 1.314: download - view: text, markup, annotated - select for diffs
Tue Aug 20 08:21:04 2024 UTC (5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +16 -4 lines
arp: fix the behavior on detecting an address duplication without IPv4 DAD

On receiving an ARP request that has the same source protocol address as
the own address, i.e., address duplication, the original behavior of
a kernel prior to supporing IPv4 DAD is to send an ARP reply.   It is
the same with a latest kernel with DAD enabled.  However, a latest
kernel without DAD sends back an GARP packet.  Restore the original
behavior.

Revision 1.313: download - view: text, markup, annotated - select for diffs
Sat Jun 29 12:59:08 2024 UTC (6 months, 3 weeks ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +8 -8 lines
netinet: Use _NET_STAT* API instead of direct array access.

PR kern/58380

Revision 1.311.2.1: download - view: text, markup, annotated - select for diffs
Sun Mar 10 19:07:41 2024 UTC (10 months, 2 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +4 -4 lines
Pull up following revision(s) (requested by riastradh in ticket #618):

	sys/netinet/if_arp.c: revision 1.312

Attribute debug message.
Fixes PR 57959

Revision 1.312: download - view: text, markup, annotated - select for diffs
Sat Feb 24 21:39:05 2024 UTC (11 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +4 -4 lines
Attribute debug message.
Fixes PR 57959

Revision 1.311: download - view: text, markup, annotated - select for diffs
Tue Nov 15 10:47:39 2022 UTC (2 years, 2 months ago) by roy
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +16 -8 lines
arp: Validate ARP source hardware address matches Ethernet source

RFC 5227 section 1.1 states that for a DaD ARP probe the sender hardware
address must match the hardware address of the interface sending the
packet.

We can now verify this by checking the mbuf tag PACKET_TAG_ETHERNET_SRC.

This fixes an obsure issue where an old router was sending out bogus
ARP probes.

Thanks to Ryo Shimizu <ryo@nerv.org> for the re-implementation.

Revision 1.310: download - view: text, markup, annotated - select for diffs
Tue Nov 15 09:15:43 2022 UTC (2 years, 2 months ago) by roy
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +3 -8 lines
Revert prior.

Revision 1.309: download - view: text, markup, annotated - select for diffs
Mon Nov 14 09:32:21 2022 UTC (2 years, 2 months ago) by roy
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +8 -3 lines
arp: Validate L2 sender hardware address matches ARP probe

RFC 5227 section 1.1 states that for a DaD ARP probe the sender hardware
address must match the hardware address of the interface sending the
packet.

We can now verify this by checking the mbuf packet header.

This fixes an obsure issue where an old router was sending out bogus
ARP probes.

Revision 1.308: download - view: text, markup, annotated - select for diffs
Sat Sep 3 01:35:03 2022 UTC (2 years, 4 months ago) by thorpej
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +10 -20 lines
Convert ARP from a legacy netisr to pktqueue.

Revision 1.297.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:29:01 2021 UTC (3 years, 9 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.297: preferred, colored; next MAIN 1.298: preferred, colored
Changes since revision 1.297: +25 -31 lines
Sync with HEAD.

Revision 1.307: download - view: text, markup, annotated - select for diffs
Fri Feb 19 14:51:59 2021 UTC (3 years, 11 months ago) by christos
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +4 -4 lines
- Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more
  correct because it works with non-primitive types and provides the ABI
  alignment for the type the compiler will use.
- Remove all the *_HDR_ALIGNMENT macros and asserts
- Replace POINTER_ALIGNED_P with ACCESSIBLE_POINTER which is identical to
  ALIGNED_POINTER, but returns that the pointer is always aligned if the
  CPU supports unaligned accesses.
[ as proposed in tech-kern ]

Revision 1.306: download - view: text, markup, annotated - select for diffs
Tue Feb 16 10:22:52 2021 UTC (3 years, 11 months ago) by martin
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +6 -11 lines
One more time: backout arp header alignment, now that the alignment
asserted has been aligned to reality.
Also remove unused ARP_HDR_ALIGNED_P macro. Pointed out by roy.

Revision 1.305: download - view: text, markup, annotated - select for diffs
Tue Feb 16 05:44:13 2021 UTC (3 years, 11 months ago) by martin
Branches: MAIN
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +5 -6 lines
Undo previous backout: alignment is needed here.
The reason for the previous backout was a misunderstanding (POINTER_ALIGNED_P
was broken, but the assertion fired even after it got fixed).

Revision 1.304: download - view: text, markup, annotated - select for diffs
Mon Feb 15 19:49:17 2021 UTC (3 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +4 -3 lines
Undo previous; POINTER_ALIGNED_P was broken.

Revision 1.303: download - view: text, markup, annotated - select for diffs
Mon Feb 15 19:19:29 2021 UTC (3 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +5 -6 lines
put back alignment (reported by martin@)

Revision 1.302: download - view: text, markup, annotated - select for diffs
Sun Feb 14 20:58:35 2021 UTC (3 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +4 -4 lines
- centralize header align and pullup into a single inline function
- use a single macro to align pointers and expose the alignment, instead
  of hard-coding 3 in 1/2 the macros.
- fix an issue in the ipv6 lt2p where it was aligning for ipv4 and pulling
  for ipv6.

Revision 1.301: download - view: text, markup, annotated - select for diffs
Sun Feb 14 19:47:17 2021 UTC (3 years, 11 months ago) by roy
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +22 -25 lines
if_arp: Just KASSERT that arphrd is aligned

While here improve readability of checking ARP IEEE1394 matches interface.

Revision 1.300: download - view: text, markup, annotated - select for diffs
Sat Feb 13 13:00:16 2021 UTC (3 years, 11 months ago) by roy
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +11 -18 lines
Prior alignment fixes should not use an offset

Revision 1.299: download - view: text, markup, annotated - select for diffs
Sat Feb 13 07:57:09 2021 UTC (3 years, 11 months ago) by roy
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +15 -5 lines
if_arp: Ensure that arphdr is aligned

Revision 1.298: download - view: text, markup, annotated - select for diffs
Tue Feb 2 10:48:33 2021 UTC (3 years, 11 months ago) by yamt
Branches: MAIN
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +3 -3 lines
arp: Plug an mbuf leak

Revision 1.297: download - view: text, markup, annotated - select for diffs
Tue Sep 15 10:05:36 2020 UTC (4 years, 4 months ago) by roy
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +6 -4 lines
Implement RFC 7048, making Neighbor Unreachability Detection less impatient

RFC 7048 Section 3 says in the UNREACHABLE state packets continue to be
sent to the link-layer address and then backoff exponentially.
We adjust this slightly and move to the INCOMPLETE state after
`nd_mmaxtries` probes and then start backing off.

This results in simpler code whilst providing a more robust model which
doubles the time to failure over what we did before.
We don't want to be back to the old ARP model where no unreachability
errors are returned because very few applications would look at
unreachability hints provided such as ND_LLINFO_UNREACHABLE or RTM_MISS.

Revision 1.296: download - view: text, markup, annotated - select for diffs
Mon Sep 14 15:09:57 2020 UTC (4 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +18 -17 lines
nd: Name l3addr union of llentry and use in-place of nd_addr.

Probably makes more sense and makes nd.h less messy.

Revision 1.295: download - view: text, markup, annotated - select for diffs
Fri Sep 11 15:16:00 2020 UTC (4 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +289 -279 lines
ARP: Use ND rather than our own.

This brings the benefit of Neighbour Unreachability Detection which is
something ARP sorely lacks.

The new timings mirror those of IPv6 and are adjustable via sysctl(8).
Unlike IPv6 ND, these are global and not per interface.

Revision 1.275.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:16 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.275.2.1: preferred, colored; branchpoint 1.275: preferred, colored; next MAIN 1.276: preferred, colored
Changes since revision 1.275.2.1: +104 -109 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.294: download - view: text, markup, annotated - select for diffs
Mon Mar 9 21:20:55 2020 UTC (4 years, 10 months ago) by roy
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +25 -8 lines
route: RTM_MISS now puts the message source address in RTA_AUTHOR

route(8) also reports this.
A userland app could use this to blacklist nodes who probe for machines
that doesn't exist on a subnet / prefix.

Revision 1.293: download - view: text, markup, annotated - select for diffs
Mon Mar 9 17:57:19 2020 UTC (4 years, 10 months ago) by roy
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +13 -9 lines
arp: report RTM_MISS when removing an unresolved entry in the arp table

Otherwise we only get it when renewing and we've sent too many requests.
This mirrors INET6 behaviour.

Revision 1.289.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 25 22:38:52 2020 UTC (5 years ago) by ad
Branches: ad-namecache
Diff to: previous 1.289: preferred, colored; next MAIN 1.290: preferred, colored
Changes since revision 1.289: +27 -74 lines
Sync with head.

Revision 1.282.2.6: download - view: text, markup, annotated - select for diffs
Fri Jan 24 18:57:02 2020 UTC (5 years ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Diff to: previous 1.282.2.5: preferred, colored; branchpoint 1.282: preferred, colored
Changes since revision 1.282.2.5: +25 -7 lines
Pull up following revision(s) (requested by roy in ticket #645):

	sys/netinet/if_arp.c: revision 1.292

arp: find source address then target address when processing input

This fixes the case where another host having a duplicate ip address
starts using it right away without probing for it's availability.

While here, prefer ifatoia over a strict cast.

Revision 1.292: download - view: text, markup, annotated - select for diffs
Thu Jan 23 17:27:35 2020 UTC (5 years ago) by roy
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +25 -7 lines
arp: find source address then target address when processing input

This fixes the case where another host having a duplicate ip address
starts using it right away without probing for it's availability.

While here, prefer ifatoia over a strict cast.

Revision 1.291: download - view: text, markup, annotated - select for diffs
Mon Jan 20 18:38:22 2020 UTC (5 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +2 -21 lines
Remove FDDI support.

Revision 1.290: download - view: text, markup, annotated - select for diffs
Sun Jan 19 20:00:37 2020 UTC (5 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +4 -50 lines
Remove Token Ring support.

Revision 1.282.2.5: download - view: text, markup, annotated - select for diffs
Fri Oct 11 18:22:14 2019 UTC (5 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-0-RC1
Diff to: previous 1.282.2.4: preferred, colored; branchpoint 1.282: preferred, colored
Changes since revision 1.282.2.4: +9 -7 lines
Pull up following revision(s) (requested by roy in ticket #300):

	sys/netinet/if_arp.c: revision 1.289

ARP: Don't defend ARP probes.

We should let the nature of ARP takes it's course here when our address
is neither tentative nor duplicated.
This allows the host to work with ARP ping, which was broken in r1.279.

Revision 1.289: download - view: text, markup, annotated - select for diffs
Fri Oct 11 13:32:46 2019 UTC (5 years, 3 months ago) by roy
Branches: MAIN
CVS tags: phil-wifi-20191119, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +9 -7 lines
ARP: Don't defend ARP probes.

We should let the nature of ARP takes it's course here when our address
is neither tentative nor duplicated.
This allows the host to work with ARP ping, which was broken in r1.279.

Revision 1.282.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 30 15:55:40 2019 UTC (5 years, 3 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.282.2.3: preferred, colored; branchpoint 1.282: preferred, colored
Changes since revision 1.282.2.3: +20 -12 lines
Pull up following revision(s) (requested by ozaki-r in ticket #269):

	sys/netinet6/nd6.h: revision 1.88
	sys/net/rtsock_shared.c: revision 1.10
	sys/netinet6/nd6_nbr.c: revision 1.174
	sys/netinet6/nd6.c: revision 1.264
	sys/netinet/if_arp.c: revision 1.283
	sys/netinet/if_arp.c: revision 1.288

Initialize DAD components properly

The original code initialized each component in non-init functions such as
arp_dad_start and nd6_dad_find, conditionally based on a global flag for each.
However, it was racy because the flag and the code around it were not
protected by a lock and could cause a kernel panic at worst.

Fix the issue by initializing the components in bootup as usual.

 -

Initialize dom_mowner for MBUFTRACE

Revision 1.250.2.10: download - view: text, markup, annotated - select for diffs
Mon Sep 30 15:48:45 2019 UTC (5 years, 3 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.250.2.9: preferred, colored; branchpoint 1.250: preferred, colored; next MAIN 1.251: preferred, colored
Changes since revision 1.250.2.9: +13 -12 lines
Pull up following revision(s) (requested by ozaki-r in ticket #1396):

	sys/netinet6/nd6.h: revision 1.88
	sys/netinet6/nd6_nbr.c: revision 1.174
	sys/netinet6/nd6.c: revision 1.264
	sys/netinet/if_arp.c: revision 1.288 (patch)

Initialize DAD components properly

The original code initialized each component in non-init functions such as
arp_dad_start and nd6_dad_find, conditionally based on a global flag for each.
However, it was racy because the flag and the code around it were not
protected by a lock and could cause a kernel panic at worst.

Fix the issue by initializing the components in bootup as usual.

Revision 1.288: download - view: text, markup, annotated - select for diffs
Wed Sep 25 09:52:32 2019 UTC (5 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +13 -12 lines
Initialize DAD components properly

The original code initialized each component in non-init functions such as
arp_dad_start and nd6_dad_find, conditionally based on a global flag for each.
However, it was racy because the flag and the code around it were not
protected by a lock and could cause a kernel panic at worst.

Fix the issue by initializing the components in bootup as usual.

Revision 1.282.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 5 08:34:11 2019 UTC (5 years, 4 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.282.2.2: preferred, colored; branchpoint 1.282: preferred, colored
Changes since revision 1.282.2.2: +32 -14 lines
Pull up following revision(s) (requested by roy in ticket #170):

	sys/netinet/if_arp.c: revision 1.287

inet: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.

This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This tells us when a new lladdr has been added (RTM_ADD),
changed (RTM_CHANGE), deleted (RTM_DELETED) or has failed to been
resolved (RTM_MISS). The latter case can be interpreted as unreachable.

Revision 1.287: download - view: text, markup, annotated - select for diffs
Sun Sep 1 22:09:02 2019 UTC (5 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +32 -14 lines
inet: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.
This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This tells us when a new lladdr has been added (RTM_ADD),
changed (RTM_CHANGE), deleted (RTM_DELETED) or has failed to been
resolved (RTM_MISS). The latter case can be interpreted as unreachable.

Revision 1.282.2.2: download - view: text, markup, annotated - select for diffs
Sun Sep 1 14:04:37 2019 UTC (5 years, 4 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.282.2.1: preferred, colored; branchpoint 1.282: preferred, colored
Changes since revision 1.282.2.1: +3 -11 lines
Pull up following revision(s) (requested by roy in ticket #147):

	sys/netinet/if_arp.c: revision 1.285
	sys/netinet/if_arp.c: revision 1.286

ARP: remove unused sysctl entry log_unknown_network

ARP: change default sysctl entry log_movements to 0
IP address sharing is a thing and shouldn't cause needless diagnostics
by default.

Revision 1.286: download - view: text, markup, annotated - select for diffs
Fri Aug 30 18:52:00 2019 UTC (5 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +3 -3 lines
ARP: change default sysctl entry log_movements to 0

IP address sharing is a thing and shouldn't cause needless diagnostics
by default.

Revision 1.285: download - view: text, markup, annotated - select for diffs
Fri Aug 30 18:48:34 2019 UTC (5 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +2 -10 lines
ARP: remove unused sysctl entry log_unknown_network

Revision 1.282.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 26 13:42:36 2019 UTC (5 years, 5 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +4 -3 lines
Pull up following revision(s) (requested by roy in ticket #109):

	sys/net/route.h: revision 1.124
	sys/netinet6/nd6.c: revision 1.258
	sys/netinet6/nd6.c: revision 1.259
	sys/net/rtsock.c: revision 1.251
	sys/netinet/if_arp.c: revision 1.284
	sys/netinet6/nd6_nbr.c: revision 1.167

rtsock: rework rt_clonedmsg to take a message type and lladdr

We will use this in a future patch to notify userland of lladdr
changes.

XXX pullup -8 -9

 -

nd6: notify userland of neighbour lla updates once more

XXX pullup -8 -9

Revision 1.284: download - view: text, markup, annotated - select for diffs
Thu Aug 22 21:14:46 2019 UTC (5 years, 5 months ago) by roy
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +4 -3 lines
rtsock: rework rt_clonedmsg to take a message type and lladdr

We will use this in a future patch to notify userland of lladdr
changes.

XXX pullup -8 -9

Revision 1.283: download - view: text, markup, annotated - select for diffs
Mon Aug 19 03:23:30 2019 UTC (5 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +9 -2 lines
Initialize dom_mowner for MBUFTRACE

Revision 1.275.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:47 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +49 -65 lines
Sync with HEAD

Revision 1.282: download - view: text, markup, annotated - select for diffs
Mon Apr 29 16:12:30 2019 UTC (5 years, 8 months ago) by roy
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +24 -15 lines
Introduce rt_addrmsg_src which adds RTA_AUTHOR to the message.
Use this when we notify userland of a duplicate address
and set RTA_AUTHOR to the hardware address of the sender.

While here, match the logging diagnostic of INET6 to the simpler one
of INET so it's consistent.

Revision 1.281: download - view: text, markup, annotated - select for diffs
Mon Apr 29 16:05:46 2019 UTC (5 years, 8 months ago) by roy
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +14 -43 lines
Move lla_snprintf from if_arp.c to dl_print.c

Revision 1.280: download - view: text, markup, annotated - select for diffs
Mon Apr 29 11:57:22 2019 UTC (5 years, 8 months ago) by roy
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +5 -5 lines
rtsock: Route address message simplification

Rename rt_newaddrmsg to rt_addrmsg_rt.
Add rt_addrmsg which drops the error and route arguments which are only
needed by one caller.

Revision 1.279: download - view: text, markup, annotated - select for diffs
Wed Apr 24 10:20:36 2019 UTC (5 years, 9 months ago) by roy
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +6 -7 lines
ARP: Enable Address Defence again.

Revert the tentative/duplicated check and test for if it's been broadcast
or not. This reverts r1.245.

Revision 1.268.2.6: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:02:05 2018 UTC (6 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.268.2.5: preferred, colored; branchpoint 1.268: preferred, colored; next MAIN 1.269: preferred, colored
Changes since revision 1.268.2.5: +8 -8 lines
Sync with HEAD, resolve a few conflicts

Revision 1.278: download - view: text, markup, annotated - select for diffs
Sat Dec 22 14:28:57 2018 UTC (6 years, 1 month ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, isaki-audio2-base, isaki-audio2
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +4 -4 lines
Replace M_ALIGN and MH_ALIGN by m_align.

Revision 1.277: download - view: text, markup, annotated - select for diffs
Thu Nov 29 09:51:20 2018 UTC (6 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +6 -6 lines
Introduce and use ip_dad_enabled() and ip6_dad_enabled() functions

Revision 1.268.2.5: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:51 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.268.2.4: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.4: +7 -2 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.250.2.9: download - view: text, markup, annotated - select for diffs
Tue Nov 6 14:38:58 2018 UTC (6 years, 2 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.250.2.8: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.8: +7 -2 lines
Pull up following revision(s) (requested by ozaki-r in ticket #1080):

	sys/netinet6/nd6.c: revision 1.251
	sys/netinet/if_arp.c: revision 1.276
	sys/net/if.c: revision 1.438
	sys/net/if.c: revision 1.439
	sys/net/route.c: revision 1.214
	sys/net/route.c: revision 1.215
	sys/net/route.c: revision 1.216
	sys/netinet6/in6.c: revision 1.270
	sys/net/route.h: revision 1.120
	sys/net/if.c: revision 1.440

Remove a wrong assertion in ifaref

 -

Doing ifref on an ifa with IFA_DESTROYING is not a problem; the reference should
be dropped during the destruction of the ifa.

 -

Use atomic operations for ifa_refcnt

 -

Avoid a dangling pointer during rt_replace_ifa

 -

Avoid double rt_replace_ifa on rtrequest1(RTM_ADD)

Some callers of rtrequest1(RTM_ADD) adjust rt_ifa of an rtentry created by
rtrequest1 that may change rt_ifa (in ifa_rtrequest) with another ifa that is
different from requested one.  It's wasteful and even worse introduces a race
condition.  rtrequest1 should just use a passed ifa as is if a caller hopes so.

 -

Use rt_update framework on updating a rtentry

Revision 1.276: download - view: text, markup, annotated - select for diffs
Tue Oct 30 05:54:41 2018 UTC (6 years, 2 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-1126
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +7 -2 lines
Avoid double rt_replace_ifa on rtrequest1(RTM_ADD)

Some callers of rtrequest1(RTM_ADD) adjust rt_ifa of an rtentry created by
rtrequest1 that may change rt_ifa (in ifa_rtrequest) with another ifa that is
different from requested one.  It's wasteful and even worse introduces a race
condition.  rtrequest1 should just use a passed ifa as is if a caller hopes so.

Revision 1.268.2.4: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:16 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.268.2.3: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.3: +3 -3 lines
Sync with HEAD

Revision 1.275: download - view: text, markup, annotated - select for diffs
Fri May 11 13:56:43 2018 UTC (6 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +3 -3 lines
static

Revision 1.268.2.3: download - view: text, markup, annotated - select for diffs
Wed May 2 07:20:23 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.268.2.2: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.2: +2 -3 lines
Synch with HEAD

Revision 1.274: download - view: text, markup, annotated - select for diffs
Tue May 1 07:21:39 2018 UTC (6 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0502
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +2 -3 lines
Remove now unused net_osdep.h includes, the other BSDs did the same.

Revision 1.268.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 16 02:00:08 2018 UTC (6 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.268.2.1: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.1: +19 -11 lines
Sync with HEAD, resolve some conflicts

Revision 1.273: download - view: text, markup, annotated - select for diffs
Wed Apr 11 05:38:47 2018 UTC (6 years, 9 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0422, pgoyette-compat-0415
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +11 -2 lines
Add XXX.

Revision 1.272: download - view: text, markup, annotated - select for diffs
Tue Apr 10 08:41:14 2018 UTC (6 years, 9 months ago) by maxv
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +10 -11 lines
Remove unused mbuf argument from arpcreate() and arplookup().

Revision 1.250.2.8: download - view: text, markup, annotated - select for diffs
Mon Apr 2 08:54:35 2018 UTC (6 years, 9 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.250.2.7: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.7: +26 -20 lines
Pull up following revision(s) (requested by ozaki-r in ticket #686):

	sys/netinet/if_arp.c: revision 1.271
	sys/netinet6/nd6_nbr.c: revision 1.151,1.152

Avoid passing NULL to nd6_dad_duplicated
Fix PR kern/53075

Fix a race condition on DAD destructions (again)

The previous fix to DAD timers was wrong; it avoided a use-after-free but
instead introduced a memory leak.  The destruction method had delegated
a destruction of a DAD timer to the timer itself and told that by setting NULL
to dp->dad_ifa.  However, the previous fix made DAD timers do nothing on
the sign.

Fixing the issue with using callout_stop isn't easy.  One approach is to have
a refcount on dp but it introduces extra complexity that we want to avoid.
The new fix falls back to using callout_halt, which was abandoned because of
softnet_lock.  Fortunately now the network stack is protected by KERNEL_LOCK
so we can remove softnet_lock from DAD timers (callout) and use callout_halt
safely.

Revision 1.268.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 15 09:12:06 2018 UTC (6 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +50 -44 lines
Synch with HEAD

Revision 1.250.2.7: download - view: text, markup, annotated - select for diffs
Tue Mar 13 13:27:10 2018 UTC (6 years, 10 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.250.2.6: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.6: +26 -26 lines
Pull up following revision(s) (requested by ozaki-r in ticket #622):
	sys/netinet/if_arp.c: revision 1.270
	sys/net/if_llatbl.c: revision 1.24 (patch)
	sys/net/if_llatbl.c: revision 1.25
	sys/net/if_llatbl.c: revision 1.26
	sys/net/route.c: revision 1.204
	sys/netinet6/in6.c: revision 1.261
	sys/netinet6/in6.c: revision 1.262 (patch)
	sys/netinet6/in6.c: revision 1.263
	sys/netinet/in.c: revision 1.216
	sys/netinet6/in6.c: revision 1.264
	sys/netinet6/nd6.c: revision 1.246 (patch)
	sys/netinet/if_arp.c: revision 1.269
	sys/net/if_llatbl.h: revision 1.14
	sys/netinet6/in6.c: revision 1.259
	sys/netinet/in.c: revision 1.220
	sys/netinet/in.c: revision 1.221 (patch)
	sys/netinet/in.c: revision 1.222
	sys/netinet/in.c: revision 1.223

Suppress noisy debugging outputs
Even if DEBUG they are too noisy under load.

Tweak sanity checks

Scheduling a timer of static entries is wrong.

Add assertions

We must not destroy llentries holding mbufs.

Fix reference leaks of llentry
callout_reset and callout_halt can cancel a pending callout without telling us.
Detect a cancel and remove a reference by using callout_pending and
callout_stop (it's a bit tricy though, we can detect it).
While here, we can remove remaining abuses of mutex_owned for softnet_lock.

Fix memory leaks on arp -d and ndp -d for static entries
We have to delete entries on in_lltable_delete and in6_lltable_delete
unconditionally.  Note that we don't need to worry about LLE_IFADDR because
there is no such entries now.

Use pool(9) for llentry allocations
llentry is easy to be leaked and pool suits for it because pool is usable to
detect leaks.

Also sweep unnecessary wrappers for llentry, in_llentry and in6_llentry.

Revision 1.271: download - view: text, markup, annotated - select for diffs
Thu Mar 8 06:48:23 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +26 -20 lines
Fix a race condition on DAD destructions (again)

The previous fix to DAD timers was wrong; it avoided a use-after-free but
instead introduced a memory leak.  The destruction method had delegated
a destruction of a DAD timer to the timer itself and told that by setting NULL
to dp->dad_ifa.  However, the previous fix made DAD timers do nothing on
the sign.

Fixing the issue with using callout_stop isn't easy.  One approach is to have
a refcount on dp but it introduces extra complexity that we want to avoid.

The new fix falls back to using callout_halt, which was abandoned because of
softnet_lock.  Fortunately now the network stack is protected by KERNEL_LOCK
so we can remove softnet_lock from DAD timers (callout) and use callout_halt
safely.

Revision 1.270: download - view: text, markup, annotated - select for diffs
Tue Mar 6 07:24:01 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +23 -21 lines
Fix reference leaks of llentry

callout_reset and callout_halt can cancel a pending callout without telling us.
Detect a cancel and remove a reference by using callout_pending and
callout_stop (it's a bit tricy though, we can detect it).

While here, we can remove remaining abuses of mutex_owned for softnet_lock.

Revision 1.269: download - view: text, markup, annotated - select for diffs
Tue Mar 6 07:19:03 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +5 -7 lines
Tweak sanity checks

Scheduling a timer of static entries is wrong.

Revision 1.268: download - view: text, markup, annotated - select for diffs
Thu Mar 1 14:40:57 2018 UTC (6 years, 10 months ago) by roy
Branches: MAIN
CVS tags: pgoyette-compat-base
Branch point for: pgoyette-compat
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +4 -4 lines
Sprinkle some const.

Revision 1.250.2.6: download - view: text, markup, annotated - select for diffs
Mon Feb 26 13:36:01 2018 UTC (6 years, 11 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.250.2.5: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.5: +6 -11 lines
Pull up following revision(s) (requested by ozaki-r in ticket #589):
	sys/netinet/if_arp.c: revision 1.267
	sys/netinet6/nd6_nbr.c: revision 1.146-1.148

Use KASSERT for checking a programming error

Simplify; pass dp to nd6_dad_duplicated instead of looking it up again in it

Avoid a race condition of DAD timer destructions

When we see dp->dad_ifa == NULL, it means that the ifa is being deleted and also
the callout is scheduled again by someone.  We shouldn't rely on a result of
callout_pending to know if the callout is scheduled because it returns false if
the subsequent callout handler is already on the fly.
We have to always delegate the destruction of dp to the subsequent handler
unconditionally if dp->dad_ifa == NULL. Otherwise, the first handler destroys
the dp and the second handler tries to handle destroyed dp.

Revision 1.267: download - view: text, markup, annotated - select for diffs
Sat Feb 24 07:53:15 2018 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +6 -11 lines
Avoid a race condition of DAD timer destructions

When we see dp->dad_ifa == NULL, it means that the ifa is being deleted and also
the callout is scheduled again by someone.  We shouldn't rely on a result of
callout_pending to know if the callout is scheduled because it returns false if
the subsequent callout handler is already on the fly.

We have to always delegate the destruction of dp to the subsequent handler
unconditionally if dp->dad_ifa == NULL. Otherwise, the first handler destroys
the dp and the second handler tries to handle destroyed dp.

Revision 1.266: download - view: text, markup, annotated - select for diffs
Wed Feb 14 14:15:53 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +4 -9 lines
Remove IFF_STATICARP, we don't support this, and the code is useless in its
current form.

ok ozaki-r@

Revision 1.265: download - view: text, markup, annotated - select for diffs
Tue Feb 13 14:50:28 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +9 -3 lines
Mmh. Add a missing check: if ARP was disabled on the interface, don't
process ARP packets. Otherwise the kernel will add ARP entries even if

	ifconfig wm0 -arp

was entered.

Revision 1.264: download - view: text, markup, annotated - select for diffs
Tue Feb 13 10:47:41 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +17 -6 lines
Be tougher:

 * In arpintr(), don't allow IEEE1394 packets on non-IEEE1394 interfaces.

 * In revarpinput(), kick IEEE1394 packets right away. They are not
   supported.

Revision 1.263: download - view: text, markup, annotated - select for diffs
Tue Feb 13 10:31:01 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +13 -11 lines
Same change as rev1.258, but this time in revarpinput: use m_pullup.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Tue Feb 13 10:20:50 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +13 -16 lines
Minor stylistic changes, and use C99 types.

Revision 1.261: download - view: text, markup, annotated - select for diffs
Tue Feb 13 10:05:05 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +3 -16 lines
Replace dead code by KASSERT.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Tue Feb 13 08:51:37 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +14 -19 lines
Don't force ARPHRD_IEEE1394 on IEEE1394 interfaces. If it's not there, then
kick the packet. And do this earlier.

Revision 1.259: download - view: text, markup, annotated - select for diffs
Tue Feb 13 08:20:12 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +6 -6 lines
Use only one label, clearer.

Revision 1.258: download - view: text, markup, annotated - select for diffs
Tue Feb 13 07:51:24 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +21 -20 lines
Fix three things in arpintr():

 * mtod can't return NULL.

 * It is wrong to kick the packet if m->m_len < arplen. While this check
   always returns false for native Ethernet interfaces, it may not if the
   frame is encapsulated in EtherIP/L2TP. Use m_pullup instead.

 * Remove XXX, it is fine. Reduce the indentation level afterwards.

Revision 1.257: download - view: text, markup, annotated - select for diffs
Tue Feb 13 07:44:25 2018 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +62 -59 lines
Style, no functional change.

Revision 1.250.2.5: download - view: text, markup, annotated - select for diffs
Fri Jan 26 15:41:12 2018 UTC (7 years ago) by martin
Branches: netbsd-8
Diff to: previous 1.250.2.4: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.4: +32 -26 lines
Pull up following revision(s) (requested by ozaki-r in ticket #511):
	sys/kern/kern_timeout.c: revision 1.54
	sys/netinet6/nd6_nbr.c: revision 1.141
	sys/netinet6/nd6_nbr.c: revision 1.144
	sys/netinet/if_arp.c: revision 1.256
Fix a deadlock on callout_halt of nd6_dad_timer
We must not call callout_halt of nd6_dad_timer with holding nd6_dad_lock because
the lock is taken in nd6_dad_timer. Once softnet_lock goes away, we can pass the
lock to callout_halt, but for now we cannot.
Make DAD destructions (MP-)safe with callout_stop
arp_dad_stoptimer and nd6_dad_stoptimer can be called with or without
softnet_lock held and unfortunately we have no easy way to statically know which.
So it is hard to use callout_halt there.
To address the situation, we use callout_stop to make the code safe. The new
approach copes with the issue by delegating the destruction of a callout to
callout itself, which allows us to not wait the callout to finish. This can be
done thanks to that DAD objects are separated from other data such as ifa.
The approach is suggested by riastradh@
Proposed on tech-kern@ and tech-net@
Sanity-check if interlock is held when it's passed

Revision 1.256: download - view: text, markup, annotated - select for diffs
Tue Jan 16 08:13:47 2018 UTC (7 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +32 -26 lines
Make DAD destructions (MP-)safe with callout_stop

arp_dad_stoptimer and nd6_dad_stoptimer can be called with or without
softnet_lock held and unfortunately we have no easy way to statically know which.
So it is hard to use callout_halt there.

To address the situation, we use callout_stop to make the code safe. The new
approach copes with the issue by delegating the destruction of a callout to
callout itself, which allows us to not wait the callout to finish. This can be
done thanks to that DAD objects are separated from other data such as ifa.

The approach is suggested by riastradh@
Proposed on tech-kern@ and tech-net@

Revision 1.250.2.4: download - view: text, markup, annotated - select for diffs
Tue Jan 2 10:20:34 2018 UTC (7 years ago) by snj
Branches: netbsd-8
Diff to: previous 1.250.2.3: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.3: +6 -19 lines
Pull up following revision(s) (requested by ozaki-r in ticket #456):
	sys/arch/arm/sunxi/sunxi_emac.c: 1.9
	sys/dev/ic/dwc_gmac.c: 1.43-1.44
	sys/dev/pci/if_iwm.c: 1.75
	sys/dev/pci/if_wm.c: 1.543
	sys/dev/pci/ixgbe/ixgbe.c: 1.112
	sys/dev/pci/ixgbe/ixv.c: 1.74
	sys/kern/sys_socket.c: 1.75
	sys/net/agr/if_agr.c: 1.43
	sys/net/bpf.c: 1.219
	sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
	sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
	sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
	sys/net/if_etherip.c: 1.40
	sys/net/if_ethersubr.c: 1.243, 1.246
	sys/net/if_faith.c: 1.57
	sys/net/if_gif.c: 1.132
	sys/net/if_l2tp.c: 1.15, 1.17
	sys/net/if_loop.c: 1.98-1.101
	sys/net/if_media.c: 1.35
	sys/net/if_pppoe.c: 1.131-1.132
	sys/net/if_spppsubr.c: 1.176-1.177
	sys/net/if_tun.c: 1.142
	sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
	sys/net/npf/npf_ifaddr.c: 1.3
	sys/net/npf/npf_os.c: 1.8-1.9
	sys/net/rtsock.c: 1.230
	sys/netcan/if_canloop.c: 1.3-1.5
	sys/netinet/if_arp.c: 1.255
	sys/netinet/igmp.c: 1.65
	sys/netinet/in.c: 1.210-1.211
	sys/netinet/in_pcb.c: 1.180
	sys/netinet/ip_carp.c: 1.92, 1.94
	sys/netinet/ip_flow.c: 1.81
	sys/netinet/ip_input.c: 1.362
	sys/netinet/ip_mroute.c: 1.147
	sys/netinet/ip_output.c: 1.283, 1.285, 1.287
	sys/netinet6/frag6.c: 1.61
	sys/netinet6/in6.c: 1.251, 1.255
	sys/netinet6/in6_pcb.c: 1.162
	sys/netinet6/ip6_flow.c: 1.35
	sys/netinet6/ip6_input.c: 1.183
	sys/netinet6/ip6_output.c: 1.196
	sys/netinet6/mld6.c: 1.90
	sys/netinet6/nd6.c: 1.239-1.240
	sys/netinet6/nd6_nbr.c: 1.139
	sys/netinet6/nd6_rtr.c: 1.136
	sys/netipsec/ipsec_output.c: 1.65
	sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
  destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
  pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.

Revision 1.154.6.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:03 2017 UTC (7 years, 1 month ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.154.6.1: preferred, colored; branchpoint 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154.6.1: +1132 -750 lines
update from HEAD

Revision 1.250.2.3: download - view: text, markup, annotated - select for diffs
Fri Nov 17 20:24:05 2017 UTC (7 years, 2 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.250.2.2: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.2: +14 -4 lines
Pull up following revision(s) (requested by ozaki-r in ticket #353):
	sys/net/if_llatbl.c: 1.22
	sys/net/if_llatbl.h: 1.13
	sys/netinet/if_arp.c: 1.254
	sys/netinet/in.c: 1.208-1.209
	sys/netinet6/in6.c: 1.249-1.250
	sys/netinet6/nd6.c: 1.237
Remove redundant KASSERTMSG
The function is static, has just one caller and the caller does the same check.
--
Fix a deadlock between a route update and lltable
It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.
If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.
A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update
Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.
Note that the deadlock happens only if NET_MPSAFE is enabled.

Revision 1.255: download - view: text, markup, annotated - select for diffs
Fri Nov 17 07:37:12 2017 UTC (7 years, 2 months ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +6 -19 lines
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch

It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.

No functional change

Revision 1.254: download - view: text, markup, annotated - select for diffs
Fri Nov 10 07:24:28 2017 UTC (7 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +14 -4 lines
Fix a deadlock between a route update and lltable

It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.

If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.

A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update

Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.

Note that the deadlock happens only if NET_MPSAFE is enabled.

Revision 1.160.2.12: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:12 2017 UTC (7 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.11: preferred, colored; branchpoint 1.160: preferred, colored; next MAIN 1.161: preferred, colored
Changes since revision 1.160.2.11: +109 -103 lines
Sync with HEAD

Revision 1.250.2.2: download - view: text, markup, annotated - select for diffs
Fri Jul 7 13:57:27 2017 UTC (7 years, 6 months ago) by martin
Branches: netbsd-8
CVS tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.250.2.1: preferred, colored; branchpoint 1.250: preferred, colored
Changes since revision 1.250.2.1: +9 -32 lines
Pull up following revision(s) (requested by ozaki-r in ticket #107):
	usr.sbin/arp/arp.c: revision 1.56
	sys/net/rtsock.c: revision 1.218
	sys/net/if_llatbl.c: revision 1.20
	usr.sbin/arp/arp.c: revision 1.57
	sys/net/rtsock.c: revision 1.219
	sys/net/if_llatbl.c: revision 1.21
	usr.sbin/arp/arp.c: revision 1.58
	tests/net/net_common.sh: revision 1.19
	sys/netinet6/nd6.h: revision 1.84
	sys/netinet6/nd6.h: revision 1.85
	tests/net/arp/t_arp.sh: revision 1.23
	sys/netinet6/in6.c: revision 1.246
	tests/net/arp/t_arp.sh: revision 1.24
	sys/netinet6/in6.c: revision 1.247
	tests/net/arp/t_arp.sh: revision 1.25
	sys/netinet6/in6.c: revision 1.248
	tests/net/arp/t_arp.sh: revision 1.26
	usr.sbin/ndp/ndp.c: revision 1.49
	tests/net/arp/t_arp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.20
	tests/net/arp/t_arp.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.21
	tests/net/arp/t_arp.sh: revision 1.29
	tests/net/ndp/t_ndp.sh: revision 1.22
	tests/net/ndp/t_ndp.sh: revision 1.23
	tests/net/route/t_flags6.sh: revision 1.13
	tests/net/ndp/t_ndp.sh: revision 1.24
	tests/net/route/t_flags6.sh: revision 1.14
	tests/net/ndp/t_ndp.sh: revision 1.25
	tests/net/route/t_flags6.sh: revision 1.15
	tests/net/ndp/t_ndp.sh: revision 1.26
	sbin/route/rtutil.c: revision 1.9
	tests/net/ndp/t_ndp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.28
	tests/net/net/t_ipv6address.sh: revision 1.14
	tests/net/ndp/t_ra.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.29
	sys/net/route.h: revision 1.113
	tests/net/ndp/t_ra.sh: revision 1.29
	sys/net/rtsock.c: revision 1.220
	sys/net/rtsock.c: revision 1.221
	sys/net/rtsock.c: revision 1.222
	sys/net/rtsock.c: revision 1.223
	tests/net/route/t_route.sh: revision 1.13
	sys/net/rtsock.c: revision 1.224
	sys/net/route.c: revision 1.196
	sys/net/if_llatbl.c: revision 1.19
	sys/net/route.c: revision 1.197
	sbin/route/route.c: revision 1.156
	tests/net/route/t_flags.sh: revision 1.16
	tests/net/route/t_flags.sh: revision 1.17
	usr.sbin/ndp/ndp.c: revision 1.50
	tests/net/route/t_flags.sh: revision 1.18
	sys/netinet/in.c: revision 1.204
	tests/net/route/t_flags.sh: revision 1.19
	sys/netinet/in.c: revision 1.205
	tests/net/arp/t_arp.sh: revision 1.30
	tests/net/arp/t_arp.sh: revision 1.31
	sys/net/if_llatbl.h: revision 1.11
	tests/net/arp/t_arp.sh: revision 1.32
	sys/net/if_llatbl.h: revision 1.12
	tests/net/arp/t_arp.sh: revision 1.33
	sys/netinet6/nd6.c: revision 1.233
	sys/netinet6/nd6.c: revision 1.234
	sys/netinet/if_arp.c: revision 1.251
	sys/netinet6/nd6.c: revision 1.235
	sys/netinet/if_arp.c: revision 1.252
	sbin/route/route.8: revision 1.57
	sys/net/rtsock.c: revision 1.214
	sys/net/rtsock.c: revision 1.215
	sys/net/rtsock.c: revision 1.216
	sys/net/rtsock.c: revision 1.217
whitespace police
Simplify
We can assume that rt_ifp is always non-NULL.
Sending a routing message (RTM_ADD) on adding an llentry
A message used to be sent on adding a cloned route. Restore the
behavior for backward compatibility.
Requested by ryo@
Drop RTF_CONNECTED from a result of RTM_GET for ARP/NDP entries
ARP/NDP entries aren't connected routes.
Reported by ryo@
Support -c <count> option for route monitor
route command exits if it receives <count> routing messages where
<count> is a value specified by -c.
The option is useful to get only particular message(s) in a test script.
Test routing messages emitted on operations of ARP/NDP entries
Do netstat -a for an appropriate protocol
Add missing declarations for cleanup
Set net.inet.arp.keep only if it's required
Don't create a permanent L2 cache entry on adding an address to an interface
It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).
Fix typo
Fix in_lltable_match_prefix
The function has not been used but will be used soon.
Remove unused function (nd6_rem_ifa_lle)
Allow in6_lltable_free_entry to be called without holding the afdata lock of ifp as well as in_lltable_free_entry
This behavior is a bit odd and should be fixed in the future...
Purge ARP/NDP entries on an interface when the interface is down
Fix PR kern/51179
Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
Purge L2 caches on changing an interface of a route
The change addresses situations similar to PR 51179.
Test implicit removals of ARP/NDP entries
One test case reproudces PR 51179.
Fix build of kernels without both INET and INET6
Tweak lltable_sysctl_dumparp
- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
  because it's not only for ARP
- Enable it not only for INET but also for INET6
Fix usage of routing messages on arp -d and ndp -d
It didn't work as we expected; we should set RTA_GATEWAY not
RTA_IFP on RTM_GET to return an if_index and the kernel should
use it on RTM_DELETE.
Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry
A message originally included only DST and GATEWAY. Restore it.
Fix ifdef; care about a case w/ INET6 and w/o INET
Drop RTF_UP from a routing message of a deleted ARP/NDP entry
Check existence of ARP/NDP entries
Checking ARP/NDP entries is valid rather than checking routes.
Fix wrong comment
Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
Restore ARP/NDP entries to route show and netstat -r
Requested by dyoung@ some time ago
Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.
arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.
Related to PR 51179
Check if ARP/NDP entries are purged when a related route is deleted

Revision 1.250.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 1 08:56:06 2017 UTC (7 years, 6 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +12 -11 lines
Pull up following revision(s) (requested by roy in ticket #77):
	sys/net/if.h: revision 1.240
	sys/netinet/if_arp.c: revision 1.253
	sys/net/if.c: revision 1.395
Introduce if_get_bylla to find an interface with the active
local link address.
--
Use if_get_bylla() instead of just looking at the lla of the interface
the address belongs to.
This allows any ARP message we receieved from another interface to
be correctly dropped.
While here, move the protocol length check higher up the food chain.

Revision 1.253: download - view: text, markup, annotated - select for diffs
Tue Jun 27 12:21:54 2017 UTC (7 years, 7 months ago) by roy
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +12 -11 lines
Use if_get_bylla() instead of just looking at the lla of the interface
the address belongs to.
This allows any ARP message we receieved from another interface to
be correctly dropped.

While here, move the protocol length check higher up the food chain.

Revision 1.252: download - view: text, markup, annotated - select for diffs
Wed Jun 21 09:05:31 2017 UTC (7 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +3 -31 lines
Don't create a permanent L2 cache entry on adding an address to an interface

It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).

Revision 1.251: download - view: text, markup, annotated - select for diffs
Fri Jun 16 02:24:54 2017 UTC (7 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +8 -3 lines
Sending a routing message (RTM_ADD) on adding an llentry

A message used to be sent on adding a cloned route. Restore the
behavior for backward compatibility.

Requested by ryo@

Revision 1.248.4.1: download - view: text, markup, annotated - select for diffs
Fri May 19 00:22:58 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.248: preferred, colored; next MAIN 1.249: preferred, colored
Changes since revision 1.248: +26 -28 lines
Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.250: download - view: text, markup, annotated - select for diffs
Thu May 18 06:33:11 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base3, netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +11 -13 lines
Lookup caches from a CARP interface if the packet is routed to the interface

This fixes CARP setups without carpdev (physical interface) having any IPs.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Fri May 12 17:53:53 2017 UTC (7 years, 8 months ago) by ryo
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +17 -17 lines
replace in_fmtaddr() by IN_PRINT(), and delete function in_fmtaddr()

Revision 1.217.2.6: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:29 2017 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.217.2.5: preferred, colored; branchpoint 1.217: preferred, colored; next MAIN 1.218: preferred, colored
Changes since revision 1.217.2.5: +2 -5 lines
Sync with HEAD

Revision 1.233.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:05 2017 UTC (7 years, 9 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.233: preferred, colored; next MAIN 1.234: preferred, colored
Changes since revision 1.233: +150 -110 lines
Sync with HEAD

Revision 1.248: download - view: text, markup, annotated - select for diffs
Tue Apr 4 09:53:02 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +2 -5 lines
Get rid of unused macros

Revision 1.217.2.5: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:50 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.217.2.4: preferred, colored; branchpoint 1.217: preferred, colored
Changes since revision 1.217.2.4: +151 -106 lines
Sync with HEAD

Revision 1.247: download - view: text, markup, annotated - select for diffs
Fri Mar 17 16:15:11 2017 UTC (7 years, 10 months ago) by roy
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +3 -3 lines
If we're not doing DAD, don't set IN_IFF_TENTATIVE.

Revision 1.158.2.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 13 07:41:28 2017 UTC (7 years, 10 months ago) by skrll
Branches: netbsd-7-nhusb
Diff to: previous 1.158.2.1: preferred, colored; next MAIN 1.158.2.2: preferred, colored
Changes since revision 1.158.2.1: +21 -10 lines
Sync with netbsd-7-1-RELEASE

Revision 1.246: download - view: text, markup, annotated - select for diffs
Fri Mar 10 20:27:31 2017 UTC (7 years, 10 months ago) by roy
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +18 -13 lines
If an ARP packet is received to the null host (0.0.0.0) then look for
an address matching the sender IP address on the interface.
This allows DAD to fail during the probe phase when a reverse ARP
proxy is present.

Revision 1.245: download - view: text, markup, annotated - select for diffs
Thu Mar 9 08:41:56 2017 UTC (7 years, 10 months ago) by roy
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +12 -4 lines
Only check target address collision if the sender address is the null
address (ie a DAD probe) or our matching address is either TENTATIVE
or DUPLICATED.

Revision 1.244: download - view: text, markup, annotated - select for diffs
Fri Feb 24 13:42:18 2017 UTC (7 years, 11 months ago) by roy
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +9 -4 lines
Only do DaD if the interface actually has the address.

Revision 1.243: download - view: text, markup, annotated - select for diffs
Tue Feb 21 03:58:23 2017 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +18 -16 lines
Replace malloc for DAD with kmem and move them out of the lock for DAD

Revision 1.242: download - view: text, markup, annotated - select for diffs
Sat Feb 11 15:37:30 2017 UTC (7 years, 11 months ago) by roy
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +4 -3 lines
Allow Unicast Poll from RFC 1122 to bypass DaD checking.

Revision 1.241: download - view: text, markup, annotated - select for diffs
Tue Feb 7 02:38:08 2017 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +18 -6 lines
Add missing NULL checks for m_get_rcvif

Revision 1.158.2.2: download - view: text, markup, annotated - select for diffs
Sun Feb 5 19:20:22 2017 UTC (7 years, 11 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Diff to: previous 1.158.2.1: preferred, colored; branchpoint 1.158: preferred, colored; next MAIN 1.159: preferred, colored
Changes since revision 1.158.2.1: +21 -10 lines
Pull up following revision(s) (requested by maxv in ticket #1356):
	sys/netinet/if_arp.c: revision 1.238, 1.239 via patch
Make sure the protocol address length equals that of IPv4. Also, make sure
the hardware address length equals that of the interface we received the
packet on. Otherwise a packet could easily set them both to zero and make
the kernel read beyond the allocated mbuf, which is terrible.
Note: for the latter we drop the packet instead of replying, since it is
malformed.
Note: I also added an ugly hack in CARP, since it apparently expects at
least six bytes.
--
Add some checks, mostly same as in_arpinput.

Revision 1.158.4.1: download - view: text, markup, annotated - select for diffs
Sun Feb 5 19:17:25 2017 UTC (7 years, 11 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.158: preferred, colored; next MAIN 1.159: preferred, colored
Changes since revision 1.158: +21 -10 lines
Pull up following revision(s) (requested by maxv in ticket #1356):
	sys/netinet/if_arp.c: revision 1.238, 1.239 via patch
Make sure the protocol address length equals that of IPv4. Also, make sure
the hardware address length equals that of the interface we received the
packet on. Otherwise a packet could easily set them both to zero and make
the kernel read beyond the allocated mbuf, which is terrible.
Note: for the latter we drop the packet instead of replying, since it is
malformed.
Note: I also added an ugly hack in CARP, since it apparently expects at
least six bytes.
--
Add some checks, mostly same as in_arpinput.

Revision 1.160.2.11: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:59 2017 UTC (7 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.10: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.10: +86 -76 lines
Sync with HEAD

Revision 1.154.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 5 06:07:36 2017 UTC (7 years, 11 months ago) by snj
Branches: netbsd-6
Diff to: previous 1.154.2.2: preferred, colored; branchpoint 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154.2.2: +21 -10 lines
Pull up following revision(s) (requested by maxv in ticket #1432):
	sys/netinet/if_arp.c: 1.238, 1.239 via patch
Make sure the protocol address length equals that of IPv4. Also, make sure
the hardware address length equals that of the interface we received the
packet on. Otherwise a packet could easily set them both to zero and make
the kernel read beyond the allocated mbuf, which is terrible.
Note: for the latter we drop the packet instead of replying, since it is
malformed.
Note: I also added an ugly hack in CARP, since it apparently expects at
least six bytes.
--
Add some checks, mostly same as in_arpinput.

Revision 1.154.16.2: download - view: text, markup, annotated - select for diffs
Sun Feb 5 06:07:15 2017 UTC (7 years, 11 months ago) by snj
Branches: netbsd-6-1
Diff to: previous 1.154.16.1: preferred, colored; branchpoint 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154.16.1: +21 -10 lines
Pull up following revision(s) (requested by maxv in ticket #1432):
	sys/netinet/if_arp.c: 1.238, 1.239 via patch
Make sure the protocol address length equals that of IPv4. Also, make sure
the hardware address length equals that of the interface we received the
packet on. Otherwise a packet could easily set them both to zero and make
the kernel read beyond the allocated mbuf, which is terrible.
Note: for the latter we drop the packet instead of replying, since it is
malformed.
Note: I also added an ugly hack in CARP, since it apparently expects at
least six bytes.
--
Add some checks, mostly same as in_arpinput.

Revision 1.154.8.2: download - view: text, markup, annotated - select for diffs
Sun Feb 5 06:06:41 2017 UTC (7 years, 11 months ago) by snj
Branches: netbsd-6-0
Diff to: previous 1.154.8.1: preferred, colored; branchpoint 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154.8.1: +21 -10 lines
Pull up following revision(s) (requested by maxv in ticket #1432):
	sys/netinet/if_arp.c: 1.238, 1.239 via patch
Make sure the protocol address length equals that of IPv4. Also, make sure
the hardware address length equals that of the interface we received the
packet on. Otherwise a packet could easily set them both to zero and make
the kernel read beyond the allocated mbuf, which is terrible.
Note: for the latter we drop the packet instead of replying, since it is
malformed.
Note: I also added an ugly hack in CARP, since it apparently expects at
least six bytes.
--
Add some checks, mostly same as in_arpinput.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Tue Jan 24 07:09:24 2017 UTC (8 years ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +6 -2 lines
Tweak softnet_lock and NET_MPSAFE

- Don't hold softnet_lock in some functions if NET_MPSAFE
- Add softnet_lock to sysctl_net_inet_icmp_redirtimeout
- Add softnet_lock to expire_upcalls of ip_mroute.c
- Restore softnet_lock for in{,6}_pcbpurgeif{,0} if NET_MPSAFE
- Mark some softnet_lock for future work

Revision 1.239: download - view: text, markup, annotated - select for diffs
Sat Jan 21 11:07:46 2017 UTC (8 years ago) by maxv
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +6 -2 lines
Add some checks, mostly same as in_arpinput.

Revision 1.238: download - view: text, markup, annotated - select for diffs
Fri Jan 20 19:21:01 2017 UTC (8 years ago) by maxv
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +13 -10 lines
Make sure the protocol address length equals that of IPv4. Also, make sure
the hardware address length equals that of the interface we received the
packet on. Otherwise a packet could easily set them both to zero and make
the kernel read beyond the allocated mbuf, which is terrible.

Note: for the latter we drop the packet instead of replying, since it is
malformed.

Note: I also added an ugly hack in CARP, since it apparently expects at
least six bytes.

Revision 1.237: download - view: text, markup, annotated - select for diffs
Fri Jan 20 17:50:52 2017 UTC (8 years ago) by maxv
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +19 -22 lines
Style

Revision 1.236: download - view: text, markup, annotated - select for diffs
Fri Jan 20 17:45:42 2017 UTC (8 years ago) by maxv
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +5 -4 lines
Reput a nullcheck that was mistakenly removed in rev1.204. ar_hrd is
packet-controlled.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Mon Jan 16 15:14:16 2017 UTC (8 years ago) by christos
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +10 -13 lines
rename arplog -> ARPLOG to make it clear that it is a macro and tuck-in the
buffer used for address formatting.

Revision 1.234: download - view: text, markup, annotated - select for diffs
Mon Jan 16 07:33:36 2017 UTC (8 years ago) by ryo
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +40 -36 lines
Make ip6_sprintf(), in_fmtaddr(), lla_snprintf() and icmp6_redirect_diag() mpsafe.

Reviewed by ozaki-r@

Revision 1.217.2.4: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:51 2017 UTC (8 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.217.2.3: preferred, colored; branchpoint 1.217: preferred, colored
Changes since revision 1.217.2.3: +11 -12 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.233: download - view: text, markup, annotated - select for diffs
Mon Dec 12 03:55:57 2016 UTC (8 years, 1 month ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +3 -3 lines
Make the routing table and rtcaches MP-safe

See the following descriptions for details.

Proposed on tech-kern and tech-net


Overview
--------

We protect the routing table with a rwock and protect
rtcaches with another rwlock. Each rtentry is protected
from being freed or updated via reference counting and psref.

Global rwlocks
--------------

There are two rwlocks; one for the routing table (rt_lock) and
the other for rtcaches (rtcache_lock). rtcache_lock covers
all existing rtcaches; there may have room for optimizations
(future work).

The locking order is rtcache_lock first and rt_lock is next.

rtentry references
------------------

References to an rtentry is managed with reference counting
and psref. Either of the two mechanisms is used depending on
where a rtentry is obtained. Reference counting is used when
we obtain a rtentry from the routing table directly via
rtalloc1 and rtrequest{,1} while psref is used when we obtain
a rtentry from a rtcache via rtcache_* APIs. In both cases,
a caller can sleep/block with holding an obtained rtentry.

The reasons why we use two different mechanisms are (i) only
using reference counting hurts the performance due to atomic
instructions (rtcache case) (ii) ease of implementation;
applying psref to APIs such rtaloc1 and rtrequest{,1} requires
additional works (adding a local variable and an argument).

We will finally migrate to use only psref but we can do it
when we have a lockless routing table alternative.

Reference counting for rtentry
------------------------------

rt_refcnt now doesn't count permanent references such as for
rt_timers and rtcaches, instead it is used only for temporal
references when obtaining a rtentry via rtalloc1 and rtrequest{,1}.
We can do so because destroying a rtentry always involves
removing references of rt_timers and rtcaches to the rtentry
and we don't need to track such references. This also makes
it easy to wait for readers to release references on deleting
or updating a rtentry, i.e., we can simply wait until the
reference counter is 0 or 1. (If there are permanent references
the counter can be arbitrary.)

rt_ref increments a reference counter of a rtentry and rt_unref
decrements it. rt_ref is called inside APIs (rtalloc1 and
rtrequest{,1} so users don't need to care about it while
users must call rt_unref to an obtained rtentry after using it.

rtfree is removed and we use rt_unref and rt_free instead.
rt_unref now just decrements the counter of a given rtentry
and rt_free just tries to destroy a given rtentry.

See the next section for destructions of rtentries by rt_free.

Destructions of rtentries
-------------------------

We destroy a rtentry only when we call rtrequst{,1}(RTM_DELETE);
the original implementation can destroy in any rtfree where it's
the last reference. If we use reference counting or psref, it's
easy to understand if the place that a rtentry is destroyed is
fixed.

rt_free waits for references to a given rtentry to be released
before actually destroying the rtentry. rt_free uses a condition
variable (cv_wait) (and psref_target_destroy for psref) to wait.

Unfortunately rtrequst{,1}(RTM_DELETE) can be called in softint
that we cannot use cv_wait. In that case, we have to defer the
destruction to a workqueue.

rtentry#rt_cv, rtentry#rt_psref and global variables
(see rt_free_global) are added to conduct the procedure.

Updates of rtentries
--------------------

One difficulty to use refcnt/psref instead of rwlock for rtentry
is updates of rtentries. We need an additional mechanism to
prevent readers from seeing inconsistency of a rtentry being
updated.

We introduce RTF_UPDATING flag to rtentries that are updating.
While the flag is set to a rtentry, users cannot acquire the
rtentry. By doing so, we avoid users to see inconsistent
rtentries.

There are two options when a user tries to acquire a rtentry
with the RTF_UPDATING flag; if a user runs in softint context
the user fails to acquire a rtentry (NULL is returned).
Otherwise a user waits until the update completes by waiting
on cv.

The procedure of a updater is simpler to destruction of
a rtentry. Wait on cv (and psref) and after all readers left,
proceed with the update.

Global variables (see rt_update_global) are added to conduct
the procedure.

Currently we apply the mechanism to only RTM_CHANGE in
rtsock.c. We would have to apply other codes. See
"Known issues" section.

psref for rtentry
-----------------

When we obtain a rtentry from a rtcache via rtcache_* APIs,
psref is used to reference to the rtentry.

rtcache_ref acquires a reference to a rtentry with psref
and rtcache_unref releases the reference after using it.
rtcache_ref is called inside rtcache_* APIs and users don't
need to take care of it while users must call rtcache_unref
to release the reference.

struct psref and int bound that is needed for psref is
embedded into struct route. By doing so we don't need to
add local variables and additional argument to APIs.

However this adds another constraint to psref other than
reference counting one's; holding a reference of an rtentry
via a rtcache is allowed by just one caller at the same time.
So we must not acquire a rtentry via a rtcache twice and
avoid a recursive use of a rtcache. And also a rtcache must
be arranged to be used by a LWP/softint at the same time
somehow. For IP forwarding case, we have per-CPU rtcaches
used in softint so the constraint is guaranteed. For a h
rtcache of a PCB case, the constraint is guaranteed by the
solock of each PCB. Any other cases (pf, ipf, stf and ipsec)
are currently guaranteed by only the existence of the global
locks (softnet_lock and/or KERNEL_LOCK). If we've found the
cases that we cannot guarantee the constraint, we would need
to introduce other rtcache APIs that use simple reference
counting.

psref of rtcache is created with IPL_SOFTNET and so rtcache
shouldn't used at an IPL higher than IPL_SOFTNET.

Note that rtcache_free is used to invalidate a given rtcache.
We don't need another care by my change; just keep them as
they are.

Performance impact
------------------

When NET_MPSAFE is disabled the performance drop is 3% while
when it's enabled the drop is increased to 11%. The difference
comes from that currently we don't take any global locks and
don't use psref if NET_MPSAFE is disabled.

We can optimize the performance of the case of NET_MPSAFE
on by reducing lookups of rtcache that uses psref;
currently we do two lookups but we should be able to trim
one of two. This is a future work.

Known issues
------------

There are two known issues to be solved; one is that
a caller of rtrequest(RTM_ADD) may change rtentry (see rtinit).
We need to prevent new references during the update. Or
we may be able to remove the code (perhaps, need more
investigations).

The other is rtredirect that updates a rtentry. We need
to apply our update mechanism, however it's not easy because
rtredirect is called in softint and we cannot apply our
mechanism simply. One solution is to defer rtredirect to
a workqueue but it requires some code restructuring.

Revision 1.160.2.10: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:28 2016 UTC (8 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.9: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.9: +91 -90 lines
Sync with HEAD

Revision 1.232: download - view: text, markup, annotated - select for diffs
Sat Nov 5 20:03:15 2016 UTC (8 years, 2 months ago) by roy
Branches: MAIN
CVS tags: nick-nhusb-base-20161204
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +10 -11 lines
Don't handle ARP duplication for the unspecified address.

Revision 1.217.2.3: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:21 2016 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.217.2.2: preferred, colored; branchpoint 1.217: preferred, colored
Changes since revision 1.217.2.2: +103 -91 lines
Sync with HEAD

Revision 1.231: download - view: text, markup, annotated - select for diffs
Tue Oct 18 07:30:31 2016 UTC (8 years, 3 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20161104
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +13 -2 lines
Don't hold global locks if NET_MPSAFE is enabled

If NET_MPSAFE is enabled, don't hold KERNEL_LOCK and softnet_lock in
part of the network stack such as IP forwarding paths. The aim of the
change is to make it easy to test the network stack without the locks
and reduce our local diffs.

By default (i.e., if NET_MPSAFE isn't enabled), the locks are held
as they used to be.

Reviewed by knakahara@

Revision 1.230: download - view: text, markup, annotated - select for diffs
Tue Oct 11 13:59:30 2016 UTC (8 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +38 -45 lines
Implement RFC 5227 2.4 Ongoing Conflict Detection and Address Defence.

If ip_dad_count is 0, then the conflict is just logged and the address
is not marked as duplicated.

Revision 1.229: download - view: text, markup, annotated - select for diffs
Tue Oct 11 12:32:30 2016 UTC (8 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +36 -38 lines
Mark arprequest static and introduce arpannounce so that gratuitous
ARP requests are only send from valid addresses.

Revision 1.160.2.9: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:09 2016 UTC (8 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.8: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.8: +96 -42 lines
Sync with HEAD

Revision 1.228: download - view: text, markup, annotated - select for diffs
Mon Oct 3 11:06:06 2016 UTC (8 years, 3 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20161004
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +10 -6 lines
Fix race condition on ifqueue used by traditional netisr

If a underlying network device driver supports MSI/MSI-X, RX interrupts
can be delivered to arbitrary CPUs. This means that Layer 2 subroutines
such as ether_input (softint) and subsequent Layer 3 subroutines (softint)
which are called via traditional netisr can be dispatched on an arbitrary
CPU. Layer 2 subroutines now run without any locks (expected) and so a
Layer 2 subroutine and a Layer 3 subroutine can run in parallel.

There is a shared data between a Layer 2 routine and a Layer 3 routine,
that is ifqueue and IF_ENQUEUE (from L2) and IF_DEQUEUE (from L3) on it
are racy now.

To fix the race condition, use ifqueue#ifq_lock to protect ifqueue
instead of splnet that is meaningless now.

The same race condition exists in route_intr. Fix it as well.

Reviewed by knakahara@

Revision 1.227: download - view: text, markup, annotated - select for diffs
Sun Sep 18 02:17:43 2016 UTC (8 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +3 -2 lines
Dealing with arplog is a bit more complicated...

Revision 1.226: download - view: text, markup, annotated - select for diffs
Fri Sep 16 13:47:47 2016 UTC (8 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +3 -2 lines
Clear IN_IFF_TENTATIVE when stopping DaD here.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Fri Sep 16 09:59:45 2016 UTC (8 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +10 -4 lines
Don't setup DaD for INADDR_ANY

Revision 1.224: download - view: text, markup, annotated - select for diffs
Thu Sep 15 18:17:29 2016 UTC (8 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +4 -6 lines
Allow arplog to be used outside of if_arp.c

Revision 1.223: download - view: text, markup, annotated - select for diffs
Wed Sep 7 13:01:39 2016 UTC (8 years, 4 months ago) by roy
Branches: MAIN
CVS tags: localcount-20160914
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +13 -13 lines
Refine arplog to be like nd6log.

Revision 1.222: download - view: text, markup, annotated - select for diffs
Mon Aug 8 06:28:09 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +5 -2 lines
Restore ARP_STAT_DFRTOTAL deleted unexpectedly

Revision 1.217.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 6 00:19:10 2016 UTC (8 years, 5 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.217.2.1: preferred, colored; branchpoint 1.217: preferred, colored
Changes since revision 1.217.2.1: +36 -15 lines
Sync with HEAD

Revision 1.221: download - view: text, markup, annotated - select for diffs
Mon Aug 1 03:15:30 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160806
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +35 -14 lines
Apply pserialize and psref to struct ifaddr and its variants

This change makes struct ifaddr and its variants (in_ifaddr and in6_ifaddr)
MP-safe by using pserialize and psref. At this moment, pserialize_perform
and psref_target_destroy are disabled because (1) we don't need them
because of softnet_lock (2) they cause a deadlock because of softnet_lock.
So we'll enable them when we remove softnet_lock in the future.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Thu Jul 28 09:03:50 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +3 -3 lines
Fix panic on adding/deleting IP addresses under network load

Adding and deleting IP addresses aren't serialized with other network
opeartions, e.g., forwarding packets. So if we add or delete an IP
address under network load, a kernel panic may happen on manipulating
network-related shared objects such as rtentry and rtcache.

To avoid such panicks, we still need to hold softnet_lock in in_control
and in6_control that are called via ioctl and do network-related operations
including IP address additions/deletions.

Fix PR kern/51356

Revision 1.217.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:23 2016 UTC (8 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +32 -11 lines
Sync with HEAD

Revision 1.219: download - view: text, markup, annotated - select for diffs
Mon Jul 25 04:21:19 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160726
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +31 -9 lines
Make DAD of ARP/NDP MP-safe with coarse-grained locks

The change also prevents arp_dad_timer/nd6_dad_timer from running if
arp_dad_stop/nd6_dad_stop is called, which makes sure that callout_reset
won't be called during callout_halt.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Mon Jul 25 01:52:21 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +3 -4 lines
Use KASSERT for checking non-NULL of ifa->ifa_ifp

ifa->ifa_ifp should be always non-NULL, so doing the check only if
DIAGNOSTIC is ok.

Revision 1.160.2.8: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:22 2016 UTC (8 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.7: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.7: +63 -40 lines
Sync with HEAD

Revision 1.217: download - view: text, markup, annotated - select for diffs
Fri Jul 8 04:33:30 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +10 -19 lines
Replace macros to get an IP address with proper inline functions

The inline functions are more friendly for applying psz/psref;
they consist of only simple interations.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Wed Jul 6 06:30:08 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +5 -5 lines
Tweak indentation

Revision 1.215: download - view: text, markup, annotated - select for diffs
Fri Jul 1 05:22:33 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +3 -3 lines
Make sure to free all interface addresses in if_detach

Addresses of an interface (struct ifaddr) have a (reverse) pointer of an
interface object (ifa->ifa_ifp). If the addresses are surely freed when
their interface is destroyed, the pointer is always valid and we don't
need a tweak of replacing the pointer to if_index like mbuf.

In order to make sure the assumption, the following changes are required:
- Deactivate the interface at the firstish of if_detach. This prevents
  in6_unlink_ifa from saving multicast addresses (wrongly)
- Invalidate rtcache(s) and clear a rtentry referencing an address on
  RTM_DELETE. rtcache(s) may delay freeing an address
- Replace callout_stop with callout_halt of DAD timers to ensure stopping
  such timers in if_detach

Revision 1.214: download - view: text, markup, annotated - select for diffs
Thu Jun 30 01:34:53 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +16 -2 lines
Make sure that ifaddr is published after its initialization finished

Basically we should insert an item to a collection (say a list) after
item's initialization has been completed to avoid accessing an item
that is initialized halfway. ifaddr (in{,6}_ifaddr) isn't processed
like so and needs to be fixed.

In order to do so, we need to tweak {arp,nd6}_rtrequest that depend
on that an ifaddr is inserted during its initialization; they explore
interface's address list to determine that rt_getkey(rt) of a given
rtentry is in the list to know whether the route's interface should
be a loopback, which doesn't work after the change. To make it work,
first check RTF_LOCAL flag that is set in rt_ifa_addlocal that calls
{arp,nd6}_rtrequest eventually. Note that we still need the original
code for the case to remove and re-add a local interface route.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Tue Jun 28 02:02:56 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +4 -2 lines
Add missing NULL checks for m_get_rcvif_psref

Revision 1.212: download - view: text, markup, annotated - select for diffs
Mon Jun 20 06:46:38 2016 UTC (8 years, 7 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +6 -8 lines
apply if_output_lock() to L3 callers which call ifp->if_output() of L2(or L3 tunneling).

Revision 1.211: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:31:44 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +34 -17 lines
Avoid storing a pointer of an interface in a mbuf

Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.

The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.

The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.

Proposed on tech-kern and tech-net.

Revision 1.160.2.7: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:38 2016 UTC (8 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.6: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.6: +7 -3 lines
Sync with HEAD

Revision 1.210: download - view: text, markup, annotated - select for diffs
Tue May 17 09:00:24 2016 UTC (8 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160529
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -3 lines
Get rid of unnecessary assignment

Revision 1.209: download - view: text, markup, annotated - select for diffs
Mon Apr 25 14:38:08 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +6 -2 lines
Check error of rt_setgate and rt_settag

Revision 1.160.2.6: download - view: text, markup, annotated - select for diffs
Fri Apr 22 15:44:17 2016 UTC (8 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.5: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.5: +191 -431 lines
Sync with HEAD

Revision 1.208: download - view: text, markup, annotated - select for diffs
Tue Apr 19 04:13:56 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +9 -20 lines
Constify rtentry of arpresolve

We don't need to (rather shouldn't) modify rtentry in there.

Revision 1.207: download - view: text, markup, annotated - select for diffs
Mon Apr 18 02:24:42 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +6 -5 lines
Fix panic on receiving an ARP request

The panic happened if an ARP request has a spa (i.e., IP address) whose
ARP entry already exists in the table as a static ARP entry.

Revision 1.206: download - view: text, markup, annotated - select for diffs
Wed Apr 13 00:47:01 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +2 -110 lines
ddb: rename show arptab to show routes

show arptab command of ddb is now inappropriate because it actually dumps
routes but arp entries aren't routes anymore. So rename it to show routes
and move the code from if_arp.c to route.c.

ok christos@

Revision 1.205: download - view: text, markup, annotated - select for diffs
Thu Apr 7 03:22:15 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +32 -32 lines
- tidy up error messages
- add a length argument to arpresolve()
- add KASSERT for overflow

Revision 1.204: download - view: text, markup, annotated - select for diffs
Mon Apr 4 07:37:07 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +164 -286 lines
Separate nexthop caches from the routing table

By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
  - sysctl(NET_RT_DUMP) doesn't return them
  - If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
  - RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
  - It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
  - -[no]cloning remains because it seems there are users
  - -[no]connected is introduced and recommended
    to be used instead of -[no]cloning
- route show/netstat -r drops some flags
  - 'L' and 'c' are not seen anymore
  - 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
  a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
  http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html

Revision 1.160.2.5: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:33 2016 UTC (8 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.4: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.4: +3 -5 lines
Sync with HEAD

Revision 1.203: download - view: text, markup, annotated - select for diffs
Mon Jan 25 10:15:38 2016 UTC (9 years ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160319
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +2 -3 lines
Remove unnecessary LLE_REMREF

The code around it was copied from arptimer, but LLE_REMREF
is unnecessary because it is needed only for arptimer that
is called after LLE_ADDREF.

This is a possible fix for PR#50548, PR#50702 and PR#50704.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Thu Jan 21 15:41:30 2016 UTC (9 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +3 -4 lines
Revert previous: ran cvs commit when I meant cvs diff.  Sorry!

Hit up-arrow one too few times.

Revision 1.201: download - view: text, markup, annotated - select for diffs
Thu Jan 21 15:27:48 2016 UTC (9 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +6 -5 lines
Give proper prototype to ip_output.

Revision 1.200: download - view: text, markup, annotated - select for diffs
Wed Jan 20 21:43:59 2016 UTC (9 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +2 -3 lines
Eliminate struct protosw::pr_output.

You can't use this unless you know what it is a priori: the formal
prototype is variadic, and the different instances (e.g., ip_output,
route_output) have different real prototypes.

Convert the only user of it, raw_send in net/raw_cb.c, to take an
explicit callback argument.  Convert the only instances of it,
route_output and key_output, to such explicit callbacks for raw_send.
Use assertions to make sure the conversion to explicit callbacks is
warranted.

Discussed on tech-net with no objections:
https://mail-index.netbsd.org/tech-net/2016/01/16/msg005484.html

Revision 1.199: download - view: text, markup, annotated - select for diffs
Tue Jan 5 05:37:06 2016 UTC (9 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +3 -3 lines
Make revarprequest static

Revision 1.160.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:07 2015 UTC (9 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.3: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.3: +297 -266 lines
Sync with HEAD (as of 26th Dec)

Revision 1.198: download - view: text, markup, annotated - select for diffs
Thu Dec 17 02:38:33 2015 UTC (9 years, 1 month ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20151226
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +32 -25 lines
Fix memory leak of llentry#la_opaque

llentry#la_opaque which is for token ring is allocated in arp.c
and freed in arp.c when freeing llentry. However, llentry can be
freed from other places, e.g., lltable_free. In such cases,
la_opaque is never freed.

To fix that, add a new callback (lle_ll_free) to llentry and
register a destruction function of la_opque to it. On freeing a
llentry, we can surely free la_opque via the callback.

Revision 1.197: download - view: text, markup, annotated - select for diffs
Wed Dec 16 05:44:59 2015 UTC (9 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +3 -3 lines
Fix token_rif extractions from llentry

Revision 1.196: download - view: text, markup, annotated - select for diffs
Fri Dec 11 01:15:00 2015 UTC (9 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +14 -7 lines
Introduce arp_settimer

No functional change.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Mon Nov 30 06:45:38 2015 UTC (9 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +109 -108 lines
Get rid of a big block in in_arpinput

No functional change.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Thu Nov 19 03:03:04 2015 UTC (9 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +9 -2 lines
Restore softnet_lock and KERNEL_LOCK for rtrequest and rtfree

We still need them for rt operations.

Revision 1.154.2.2: download - view: text, markup, annotated - select for diffs
Sun Nov 15 17:51:52 2015 UTC (9 years, 2 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.154.2.1: preferred, colored; branchpoint 1.154: preferred, colored
Changes since revision 1.154.2.1: +20 -9 lines
Pull up following revision(s) (requested by ozaki-r in ticket #1328):
	sys/netinet/if_arp.c: revision 1.160
Add sysctl to selectively log arp packets from unknown network. (Adrien URBAN).

Revision 1.193: download - view: text, markup, annotated - select for diffs
Fri Nov 6 08:55:49 2015 UTC (9 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +7 -9 lines
Fix db_print_llinfo

rt_llinfo is now struct llentry.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Fri Nov 6 08:38:43 2015 UTC (9 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +3 -3 lines
Fix inappropriate rt_flags check

It depended on either RTF_CLONED or RTF_CLONING must be set, however,
the assumption didn't meet for userland problems that create a route
via RTM_ADD.

This fixes an issue that running rarpd causes the following kernel panic
reported by nonaka@:
  panic: kernel diagnostic assertion "(la->la_flags & LLE_STATIC) == 0"
  failed: file "/usr/src/sys/netinet/if_arp.c", line 1339

Revision 1.158.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 6 00:46:50 2015 UTC (9 years, 2 months ago) by riz
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-1-RC1
Branch point for: netbsd-7-nhusb
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +20 -9 lines
Pull up following revision(s) (requested by ozaki-r in ticket #985):
	sys/netinet/if_arp.c: revision 1.160
Add sysctl to selectively log arp packets from unknown network. (Adrien URBAN).

Revision 1.191: download - view: text, markup, annotated - select for diffs
Tue Oct 20 07:46:59 2015 UTC (9 years, 3 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +19 -11 lines
Stop callout in arp_rtrequest(RTM_DELETE)

This change fixes arptimer panic after removing an interface
(say by drvctl -d), which is reported by Takahiro Hayashi.

This change also fixes llentry's reference counting; we have
to take into account rtentry#rt_llinfo as well as arptimer.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Tue Oct 20 07:35:15 2015 UTC (9 years, 3 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +5 -10 lines
Stop using softnet_lock (fix possible deadlock)

Using softnet_lock for mutual exclusion between lltable_free and
arptimer was wrong and had an issue causing a deadlock between
them;  lltable_free waits arptimer completion by calling
callout_halt with softnet_lock that is held in arptimer, however
lltable_free also holds llentry's lock that is also held in
arptimer so arptimer never obtain the lock and both never go
forward eventually.  We have to pass llentry's lock to
callout_halt instead.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Wed Oct 14 11:22:55 2015 UTC (9 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +17 -11 lines
In the event of an error within arpresolve(), delete the cloned route
otherwise it would never be deleted.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Wed Oct 14 11:17:57 2015 UTC (9 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +7 -5 lines
Save and clear the la route while we have a write lock

Revision 1.187: download - view: text, markup, annotated - select for diffs
Tue Oct 13 12:33:07 2015 UTC (9 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +14 -12 lines
arpresolve() now returns 0 on success otherwise an error code.
Callers of arpresolve() now pass the error code back to their caller,
masking out EWOULDBLOCK.

This allows applications such as ping(8) to display a suitable error
condition.

Revision 1.186: download - view: text, markup, annotated - select for diffs
Tue Oct 13 11:13:37 2015 UTC (9 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +9 -7 lines
Move the NOARP check up a bit so that it works when an la is created
but hasn't been resolved yet.
Fixes PR kern/17611.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Tue Oct 13 09:33:35 2015 UTC (9 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +55 -63 lines
Simplify la handling in arpresolve() by asking arplookup() not to create
a la. If a la is needed arpresolve() will then create it or mark the
current la as writable.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Thu Oct 8 08:17:37 2015 UTC (9 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +9 -6 lines
Create a temporary define involving IFF_STATICARP if we have it
instead of just testing for __FreeBSD__.
No functional change.

ok: ozaki-r@

Revision 1.183: download - view: text, markup, annotated - select for diffs
Wed Oct 7 00:33:27 2015 UTC (9 years, 3 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +40 -39 lines
Create an llentry after fixing an interface to store

In case of RTF_LOCAL routes, we change an output interface
of a route from original one to lo0ifp. An llentry also
has to be stored to lo0ifp in such cases.

Problem reported by roy@

Revision 1.182: download - view: text, markup, annotated - select for diffs
Mon Oct 5 08:17:31 2015 UTC (9 years, 3 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +7 -7 lines
Fix arplookup logic

It should first lookup and then create an entry if not found (and if
creation is requested).

Revision 1.160.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:11 2015 UTC (9 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.2: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.2: +392 -290 lines
Sync with HEAD

Revision 1.181: download - view: text, markup, annotated - select for diffs
Fri Sep 11 10:33:32 2015 UTC (9 years, 4 months ago) by roy
Branches: MAIN
CVS tags: nick-nhusb-base-20150921
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +6 -3 lines
If, for whatever reason, a local interface route is removed and then
re-added, mark it as a local route.

While here, if changing the route to go via the loopback interface
remove any inherited MTU value.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Wed Sep 9 01:24:01 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +10 -14 lines
Remove wrong KASSERT in arptfree

la_rt can be NULL because arptimer that calls arptfree doesn't always
free llentry so llentry can remain with la_rt == NULL. So we instead
check whether la_rt is NULL or not and do arptfree if not.

This fixes PR kern/50184 (confirmed by martin@) and
PR kern/50186 (maybe).

Revision 1.179: download - view: text, markup, annotated - select for diffs
Wed Sep 9 01:22:28 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +2 -15 lines
Revert v1.176 for further proper fix

Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon Sep 7 01:18:27 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +26 -25 lines
CID 1322880: remove unnecessary m != NULL checks

Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon Sep 7 01:17:37 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +6 -8 lines
CID 1322878: simplify log output flow

Revision 1.176: download - view: text, markup, annotated - select for diffs
Wed Sep 2 09:28:13 2015 UTC (9 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +15 -2 lines
XXX: Disable KASSERT for now since locking is broken for interface removals.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Mon Aug 31 08:06:30 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +2 -18 lines
Remove obsolete global variables and sysctl MIBs

Revision 1.174: download - view: text, markup, annotated - select for diffs
Mon Aug 31 08:05:20 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +369 -242 lines
Replace ARP cache (llinfo) with lltable/llentry

Highlights of the change are:
- Use llentry instead of llinfo to manage ARP caches
  - ARP specific data are stored in the hashed list
    of an interface instead of the global list (llinfo_arp)
- Fine-grain locking on llentry
- arptimer (callout) per ARP cache
  - the global timer callout with the big locks can be
    removed (though softnet_lock is still required for now)
- net.inet.arp.prune is now obsoleted
  - it was the interval of the global timer callout
- net.inet.arp.refresh is now obsoleted
  - it was a parameter that prevents expiration of active caches
  - Removed to simplify the timer logic, but we may be able to
    restore the feature if really needed

Proposed on tech-kern and tech-net.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Mon Aug 24 22:21:26 2015 UTC (9 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +4 -2 lines
sprinkle _KERNEL_OPT

Revision 1.172: download - view: text, markup, annotated - select for diffs
Wed Aug 12 07:13:14 2015 UTC (9 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +5 -5 lines
Move insane goto label

Revision 1.171: download - view: text, markup, annotated - select for diffs
Fri Aug 7 08:11:33 2015 UTC (9 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +13 -22 lines
Use time_uptime instead of time_second to avoid time leaps

Some codes in sys/net* use time_second to manage time periods such as
cache expirations. However, time_second doesn't increase monotonically
and can leap by say settimeofday(2) according to time_second(9). We
should use time_uptime instead of it to avoid such time leaps.

This change replaces time_second with time_uptime. Additionally it
converts a time based on time_uptime to a time based on time_second
when the kernel passes the time to userland programs that expect
the latter, and vice versa.

Note that we shouldn't leak time_uptime to other hosts over the
netowrk. My investigation shows there is no such leak:
http://mail-index.netbsd.org/tech-net/2015/08/06/msg005332.html

Discussed on tech-kern and tech-net.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Wed Jul 15 08:49:15 2015 UTC (9 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +14 -14 lines
Make global variables static

Revision 1.160.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:25 2015 UTC (9 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160.2.1: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.1: +401 -35 lines
Sync with HEAD

Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri May 22 07:44:46 2015 UTC (9 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +4 -4 lines
Replace NARC with NARCNET to follow renaming at 2007

Hmm, is anyone using this?

Revision 1.168: download - view: text, markup, annotated - select for diffs
Thu May 21 09:29:51 2015 UTC (9 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +5 -8 lines
Use LIST_FOREACH{,_SAFE}

The first loop doesn't remove any items in it, so we can use
LIST_FOREACH instead of LIST_FOREACH_SAFE.

Revision 1.167: download - view: text, markup, annotated - select for diffs
Thu May 21 09:27:10 2015 UTC (9 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +6 -6 lines
Use NULL instead of 0 for pointers

Revision 1.166: download - view: text, markup, annotated - select for diffs
Thu May 21 09:26:18 2015 UTC (9 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +7 -2 lines
Make arp_init, in_revarpinput and revarprequest static

Revision 1.165: download - view: text, markup, annotated - select for diffs
Sat May 16 12:12:46 2015 UTC (9 years, 8 months ago) by roy
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +13 -4 lines
Separate ARP handling DAD from inet.
This is done by signalling the intent to try tentative addresses
and then clearing the intent once the address is setup.
When the ARP handler is installed (arp_ifinit) then it adds
dad start and stop functions to the address which are used instead
of calling ARP directly.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Sun May 3 10:44:04 2015 UTC (9 years, 8 months ago) by justin
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +6 -6 lines
Rename delay variable as it shadows a global on arm.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Sat May 2 14:41:32 2015 UTC (9 years, 8 months ago) by roy
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +375 -20 lines
Add IPv4 address flags IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and
IN_IFF_DETATCHED to mimic the IPv6 address behaviour.
Add SIOCGIFAFLAG_IN ioctl to retrieve the address flag via the
ifreq structure.
Add IPv4 DAD detection via the ARP methods described in RFC 5227.
Add sysctls net.inet.ip.dad_count and net.inet.arp.debug.

Discussed on tech-net@

Revision 1.160.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:22 2015 UTC (9 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +24 -5 lines
Sync with HEAD

Revision 1.162: download - view: text, markup, annotated - select for diffs
Mon Mar 23 18:33:17 2015 UTC (9 years, 10 months ago) by roy
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +16 -2 lines
Add RTF_BROADCAST to mark routes used for the broadcast address when
they are created on the fly. This makes it clear what the route is for
and allows an optimisation in ip_output() by avoiding a call to
in_broadcast() because most of the time we do talk to a host.
It also avoids a needless allocation for the storage of llinfo_arp and
thus vanishes from arp(8) - it showed as incomplete anyway so this
is a nice side effect.

Guard against this and routes marked with RTF_BLACKHOLE in
ip_fastforward().
While here, guard against routes marked with RTF_BLACKHOLE in
ip6_fastforward().
RTF_BROADCAST is IPv4 only, so don't bother checking that here.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Thu Feb 26 09:54:46 2015 UTC (9 years, 11 months ago) by roy
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +10 -5 lines
Introduce the routing flag RTF_LOCAL to track local address routes.
Add functions rt_ifa_addlocal() and rt_ifa_remlocal() to add and remove
local routes for the address and announce the new address and route
to the routing socket.

Add in_ifaddlocal() and in_ifremlocal() to use these functions.
Rename in6_if{add,rem}loop() to in6_if{add,rem}local() and use these
functions.

rtinit() no longer announces the address, just the network route for the
address. As such, calls to rt_newaddrmsg() have been removed from
in_addprefix() and in_scrubprefix().

This solves the problem of potentially more than one announcement, or no
announcement at all for the address in certain situations.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Thu Nov 13 16:11:18 2014 UTC (10 years, 2 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +20 -9 lines
Add sysctl to selectively log arp packets from unknown network. (Adrien URBAN).

Revision 1.159: download - view: text, markup, annotated - select for diffs
Fri Sep 5 06:02:11 2014 UTC (10 years, 4 months ago) by matt
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +3 -3 lines
Deanonymize structure for llinfo_arp.

Revision 1.154.6.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:35 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +9 -11 lines
Rebase to HEAD as of a few days ago.

Revision 1.155.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:56:25 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155: +9 -6 lines
Rebase.

Revision 1.154.8.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 09:35:40 2014 UTC (10 years, 7 months ago) by msaitoh
Branches: netbsd-6-0
CVS tags: netbsd-6-0-6-RELEASE
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +5 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #1067):
	sys/dist/ipf/netinet/ip_fil_netbsd.c	1.9 via patch
	sys/net/if_ethersubr.c			1.197 via patch
	sys/net/if_loop.c			1.77 via patch
	sys/net/if_vlan.c			1.70 via patch
	sys/netinet/if_arp.c			1.158
	sys/netinet/ip_carp.c			1.54 via patch
	sys/netinet6/ip6_flow.c			1.23 via patch
	sys/netinet6/nd6.c			1.150 via patch
	sys/rump/librump/rumpkern/klock.c	1.4

Make sure *(if_output)() is called with KERNEL_LOCK held to avoid mbuf leak.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details. For netinet6, the problem report, fix and test were done
by njoly@ on current-users@

Revision 1.154.16.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 09:34:27 2014 UTC (10 years, 7 months ago) by msaitoh
Branches: netbsd-6-1
CVS tags: netbsd-6-1-5-RELEASE
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +5 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #1067):
	sys/dist/ipf/netinet/ip_fil_netbsd.c	1.9 via patch
	sys/net/if_ethersubr.c			1.197 via patch
	sys/net/if_loop.c			1.77 via patch
	sys/net/if_vlan.c			1.70 via patch
	sys/netinet/if_arp.c			1.158
	sys/netinet/ip_carp.c			1.54 via patch
	sys/netinet6/ip6_flow.c			1.23 via patch
	sys/netinet6/nd6.c			1.150 via patch
	sys/rump/librump/rumpkern/klock.c	1.4

Make sure *(if_output)() is called with KERNEL_LOCK held to avoid mbuf leak.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details. For netinet6, the problem report, fix and test were done
by njoly@ on current-users@

Revision 1.154.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 3 15:34:00 2014 UTC (10 years, 7 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +5 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #1067):
	sys/dist/ipf/netinet/ip_fil_netbsd.c	1.9 via patch
	sys/net/if_ethersubr.c			1.197 via patch
	sys/net/if_loop.c			1.77 via patch
	sys/net/if_vlan.c			1.70 via patch
	sys/netinet/if_arp.c			1.158
	sys/netinet/ip_carp.c			1.54 via patch
	sys/netinet6/ip6_flow.c			1.23 via patch
	sys/netinet6/nd6.c			1.150 via patch
	sys/rump/librump/rumpkern/klock.c	1.4

Make sure *(if_output)() is called with KERNEL_LOCK held to avoid mbuf leak.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details. For netinet6, the problem report, fix and test were done
by njoly@ on current-users@

Revision 1.158: download - view: text, markup, annotated - select for diffs
Tue Jun 3 01:24:32 2014 UTC (10 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-0, netbsd-7
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +5 -3 lines
Call ifp->if_output in revarprequest with KERNEL_LOCK held

Otherwise, it hits KASSERT(KERNEL_LOCKED_P()) in ether_output
when nfs_boot fails and tries RARP.

Revision 1.152.2.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:09 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.152.2.1: preferred, colored; branchpoint 1.152: preferred, colored; next MAIN 1.153: preferred, colored
Changes since revision 1.152.2.1: +5 -8 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.154.10.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:13 2014 UTC (10 years, 8 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.154.10.1: preferred, colored; branchpoint 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154.10.1: +5 -8 lines
sync with head

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sun May 18 14:46:16 2014 UTC (10 years, 8 months ago) by rmind
Branches: MAIN
CVS tags: rmind-smpnet-nbase, rmind-smpnet-base
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +3 -4 lines
Add struct pr_usrreqs with a pr_generic function and prepare for the
dismantling of pr_usrreq in the protocols; no functional change intended.
PRU_ATTACH/PRU_DETACH changes will follow soon.

Bump for struct protosw.  Welcome to 6.99.62!

Revision 1.156: download - view: text, markup, annotated - select for diffs
Sat Apr 12 12:24:50 2014 UTC (10 years, 9 months ago) by gdt
Branches: MAIN
CVS tags: yamt-pagecache-base9
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +5 -3 lines
revarprequest: Avoid leaking mbuf.

In revarprequest, an mbuf could perhaps be leaked in an error path.
My reading of the code is that this is not possible, because ar_pro is
set to ETHERNET_IP, and ar_tha can only be null in the 1394 case.
But, better to have the free call anyway; ar_tha does not have a
documented interface contract :-)

Pointed out by Maxime Villard.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:30:12 2014 UTC (10 years, 11 months ago) by pooka
Branches: MAIN
CVS tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +2 -7 lines
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.154.10.1: download - view: text, markup, annotated - select for diffs
Wed Aug 28 15:21:48 2013 UTC (11 years, 5 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +3 -4 lines
Checkpoint work in progress:
- Initial split of the protocol user-request method into the following
  methods: pr_attach, pr_detach and pr_generic for old the pr_usrreq.
- Adjust socreate(9) and sonewconn(9) to call pr_attach without the
  socket lock held (as a preparation for the locking scheme adjustment).
- Adjust all pr_attach routines to assert that PCB is not set.
- Sprinkle various comments, document some routines and their locking.
- Remove M_PCB, replace with kmem(9).
- Fix few bugs spotted on the way.

Revision 1.152.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:40 2012 UTC (12 years, 9 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +4 -4 lines
sync with head

Revision 1.152.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:39 2012 UTC (12 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.152: preferred, colored; next MAIN 1.153: preferred, colored
Changes since revision 1.152: +4 -4 lines
merge to -current.

Revision 1.154: download - view: text, markup, annotated - select for diffs
Mon Jan 2 22:17:11 2012 UTC (13 years ago) by liamjfoy
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet, netbsd-6-1, netbsd-6-0, netbsd-6
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +3 -3 lines
Remove dead variable

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sat Dec 31 20:41:58 2011 UTC (13 years ago) by christos
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +3 -3 lines
- fix offsetof usage, and redundant defines
- kill pointer casts to 0

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sat Aug 27 09:05:54 2011 UTC (13 years, 5 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +43 -9 lines
Add 3 logging sysctls for arp from freebsd:

1. log_movements: do you want to log the arp overwritten message or not?
2. log_wrong_iface: do you want to log when an arp arrives at the wrong
   interface?
3. log_permanent_modify: do you want to log when an arp message attempts
   to overwrite a static entry?

I did not call the sysctls log_arp like FreeBSD does, because we already
have an arp sysctl level. The default is on for all three of them.

Revision 1.149.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:55 2011 UTC (13 years, 7 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.149: preferred, colored; next MAIN 1.150: preferred, colored
Changes since revision 1.149: +24 -6 lines
Sync with HEAD.

Revision 1.149.4.2: download - view: text, markup, annotated - select for diffs
Tue May 31 03:05:07 2011 UTC (13 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.149.4.1: preferred, colored; branchpoint 1.149: preferred, colored; next MAIN 1.150: preferred, colored
Changes since revision 1.149.4.1: +20 -2 lines
sync with head

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue May 3 16:00:29 2011 UTC (13 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +22 -4 lines
arp_drain() may be called with locks held, so instead of doing any work
in arp_drain(), set a drain-needed flag.  Do the work in the fasttimo
handler.

Contributed by Coyote Point Systems, Inc.

Revision 1.149.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:57 2011 UTC (13 years, 10 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +4 -4 lines
sync with head

Revision 1.149.8.1: download - view: text, markup, annotated - select for diffs
Tue Feb 8 16:20:02 2011 UTC (13 years, 11 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.149: preferred, colored; next MAIN 1.150: preferred, colored
Changes since revision 1.149: +4 -4 lines
Sync with HEAD

Revision 1.150: download - view: text, markup, annotated - select for diffs
Tue Feb 1 01:39:21 2011 UTC (13 years, 11 months ago) by matt
Branches: MAIN
CVS tags: bouyer-quota2-nbase, bouyer-quota2-base
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +4 -4 lines
Add a new AF/PF_ROUTE which is 64-bit clean which makes the routing socket
interface (and its associated sysctls) act identically for both 32 and 64 bit
programs.  The old unclean one remains for backward compatibility.

Revision 1.143.8.2: download - view: text, markup, annotated - select for diffs
Tue May 11 21:06:45 2010 UTC (14 years, 8 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.143.8.1: preferred, colored; branchpoint 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143.8.1: +3 -3 lines
Fix printf for u_quad_t route changes.

Revision 1.143.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:22 2010 UTC (14 years, 9 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +14 -10 lines
sync to netbsd-5

Revision 1.134.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:28 2010 UTC (14 years, 10 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.134.2.3: preferred, colored; branchpoint 1.134: preferred, colored; next MAIN 1.135: preferred, colored
Changes since revision 1.134.2.3: +19 -14 lines
sync with head

Revision 1.143.6.1: download - view: text, markup, annotated - select for diffs
Sat Nov 21 19:56:35 2009 UTC (15 years, 2 months ago) by snj
Branches: netbsd-5-0
CVS tags: netbsd-5-0-2-RELEASE
Diff to: previous 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143: +6 -4 lines
Pull up following revision(s) (requested by christos in ticket #1156):
	sys/net/if_arcsubr.c: revision 1.61
	sys/net/if_ethersubr.c: revision 1.173
	sys/net/if_fddisubr.c: revision 1.78
	sys/net/if_tokensubr.c: revision 1.58 via patch
	sys/netinet/if_arp.c: revision 1.149
ar_tha() can return NULL; treat this as an error.

Revision 1.143.4.2: download - view: text, markup, annotated - select for diffs
Sat Nov 21 19:43:41 2009 UTC (15 years, 2 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.143.4.1: preferred, colored; branchpoint 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143.4.1: +6 -4 lines
Pull up following revision(s) (requested by christos in ticket #1156):
	sys/net/if_arcsubr.c: revision 1.61
	sys/net/if_ethersubr.c: revision 1.173
	sys/net/if_fddisubr.c: revision 1.78
	sys/net/if_tokensubr.c: revision 1.58 via patch
	sys/netinet/if_arp.c: revision 1.149
ar_tha() can return NULL; treat this as an error.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Fri Nov 20 02:14:57 2009 UTC (15 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: rmind-uvmplock, jruoho-x86intr, bouyer-quota2
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +6 -4 lines
ar_tha() can return NULL; treat this as an error.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Tue Nov 3 00:57:42 2009 UTC (15 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +10 -11 lines
Handle RFC 5227 ARP probes properly, don't drop 0.0.0.0 source packets
silently. (Patrik Lahti <plahti at qnx dot com>)

Revision 1.147: download - view: text, markup, annotated - select for diffs
Wed Sep 16 15:23:04 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +7 -3 lines
Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

no change to sysctl nodes on i386/MONOLITHIC & build tested i386/ALL

Revision 1.143.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 5 11:44:07 2009 UTC (15 years, 4 months ago) by bouyer
Branches: netbsd-5
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +10 -8 lines
Pull up following revision(s) (requested by dyoung in ticket #911):
	sys/netinet/if_arp.c: revision 1.146
Don't require the gateway address to have room for both an interface
name and address.  Room for an address will do.  This should fix
a regression in 'arp -s ...' on interfaces such as xennet0 with
unusually long names. Fix PR #41878.

Revision 1.134.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 19 18:48:24 2009 UTC (15 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.134.2.2: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.2.2: +10 -8 lines
sync with head.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Wed Aug 12 22:16:15 2009 UTC (15 years, 5 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +10 -8 lines
Don't require the gateway address to have room for both an interface
name and address.  Room for an address will do.  This should fix
a regression in 'arp -s ...' on interfaces such as xennet0 with
unusually long names.

I will request a pull-up to netbsd-5.

Revision 1.134.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:14:17 2009 UTC (15 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.134.2.1: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.2.1: +24 -12 lines
sync with head.

Revision 1.143.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:20:13 2009 UTC (16 years ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143: +21 -7 lines
Sync with HEAD.

Revision 1.131.6.3: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:32 2009 UTC (16 years ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.131.6.2: preferred, colored; branchpoint 1.131: preferred, colored; next MAIN 1.132: preferred, colored
Changes since revision 1.131.6.2: +20 -8 lines
Sync with HEAD.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Sun Jan 11 02:45:54 2009 UTC (16 years ago) by christos
Branches: MAIN
CVS tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +8 -7 lines
merge christos-time_t

Revision 1.131.8.4: download - view: text, markup, annotated - select for diffs
Sun Jan 4 02:19:20 2009 UTC (16 years ago) by christos
Branches: christos-time_t
Diff to: previous 1.131.8.3: preferred, colored; branchpoint 1.131: preferred, colored; next MAIN 1.132: preferred, colored
Changes since revision 1.131.8.3: +3 -3 lines
fix time_t format

Revision 1.140.4.2: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:26 2008 UTC (16 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.140.4.1: preferred, colored; branchpoint 1.140: preferred, colored; next MAIN 1.141: preferred, colored
Changes since revision 1.140.4.1: +16 -5 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.131.8.3: download - view: text, markup, annotated - select for diffs
Sun Nov 9 23:57:23 2008 UTC (16 years, 2 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.131.8.2: preferred, colored; branchpoint 1.131: preferred, colored
Changes since revision 1.131.8.2: +15 -2 lines
merge with head.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Fri Nov 7 00:20:18 2008 UTC (16 years, 2 months ago) by dyoung
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +15 -2 lines
*** 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.

Revision 1.131.8.2: download - view: text, markup, annotated - select for diffs
Sat Nov 1 21:22:28 2008 UTC (16 years, 2 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.131.8.1: preferred, colored; branchpoint 1.131: preferred, colored
Changes since revision 1.131.8.1: +128 -89 lines
Sync with head.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Fri Oct 24 17:07:33 2008 UTC (16 years, 3 months ago) by dyoung
Branches: MAIN
CVS tags: netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5-0, netbsd-5, matt-nb5-mips64
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +3 -4 lines
Constify the rt_addrinfo argument to the ifa_rtrequest member
function of struct ifaddr.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Tue Oct 21 11:22:21 2008 UTC (16 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +2 -3 lines
arp_drain: no reason to complain if arp_lock is already held.

Revision 1.140.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:46 2008 UTC (16 years, 3 months ago) by haad
Branches: haad-dm
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +4 -4 lines
Sync with HEAD.

Revision 1.131.6.2: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:57 2008 UTC (16 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.131.6.1: preferred, colored; branchpoint 1.131: preferred, colored
Changes since revision 1.131.6.1: +2 -2 lines
Sync with HEAD.

Revision 1.137.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:37:00 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.137.2.1: preferred, colored; next MAIN 1.138: preferred, colored
Changes since revision 1.137.2.1: +4 -4 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.117.4.1: download - view: text, markup, annotated - select for diffs
Thu Sep 4 08:46:51 2008 UTC (16 years, 4 months ago) by skrll
Branches: wrstuden-fixsa
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +4 -4 lines
Sync with netbsd-4.

Revision 1.117.8.1: download - view: text, markup, annotated - select for diffs
Fri Aug 29 21:00:19 2008 UTC (16 years, 5 months ago) by bouyer
Branches: netbsd-4-0
CVS tags: netbsd-4-0-1-RELEASE
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +4 -4 lines
Pull up following revision(s) (requested by uebayasi in ticket #1191):
	sys/netinet/if_arp.c: revision 1.141
Missing "\n" in log(9) messages.

Revision 1.117.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 29 20:59:29 2008 UTC (16 years, 5 months ago) by bouyer
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +4 -4 lines
Pull up following revision(s) (requested by uebayasi in ticket #1191):
	sys/netinet/if_arp.c: revision 1.141
Missing "\n" in log(9) messages.

Revision 1.103.6.1: download - view: text, markup, annotated - select for diffs
Fri Aug 29 20:40:04 2008 UTC (16 years, 5 months ago) by bouyer
Branches: netbsd-3-1
Diff to: previous 1.103: preferred, colored; next MAIN 1.104: preferred, colored
Changes since revision 1.103: +4 -4 lines
Pull up following revision(s) (requested by uebayasi in ticket #1956):
	sys/netinet/if_arp.c: revision 1.141
Missing "\n" in log(9) messages.

Revision 1.103.4.1: download - view: text, markup, annotated - select for diffs
Fri Aug 29 20:39:07 2008 UTC (16 years, 5 months ago) by bouyer
Branches: netbsd-3-0
Diff to: previous 1.103: preferred, colored; next MAIN 1.104: preferred, colored
Changes since revision 1.103: +4 -4 lines
Pull up following revision(s) (requested by uebayasi in ticket #1956):
	sys/netinet/if_arp.c: revision 1.141
Missing "\n" in log(9) messages.

Revision 1.103.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 29 20:37:48 2008 UTC (16 years, 5 months ago) by bouyer
Branches: netbsd-3
Diff to: previous 1.103: preferred, colored; next MAIN 1.104: preferred, colored
Changes since revision 1.103: +4 -4 lines
Pull up following revision(s) (requested by uebayasi in ticket #1956):
	sys/netinet/if_arp.c: revision 1.141
Missing "\n" in log(9) messages.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Thu Aug 28 07:58:05 2008 UTC (16 years, 5 months ago) by uebayasi
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, haad-dm-base1
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +4 -4 lines
Missing "\n" in log(9) messages.

Revision 1.137.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:58 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +42 -41 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.131.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:23 2008 UTC (16 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +125 -84 lines
Sync with HEAD.

Revision 1.132.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:28 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.132: preferred, colored; next MAIN 1.133: preferred, colored
Changes since revision 1.132: +66 -95 lines
sync with head.

Revision 1.134.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:41 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +44 -57 lines
sync with head.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Tue May 13 18:24:01 2008 UTC (16 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: haad-dm
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +10 -10 lines
bzero -> memset, bcopy -> memcpy.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Tue May 13 17:51:26 2008 UTC (16 years, 8 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +30 -30 lines
Cosmetic: use __arraycount().  s/0/NULL/ where appropriate.  Pass
"null" instead of 0 to printf %s.  Remove superfluous parentheses
in return statements.  Compare pointers with NULL instead of "testing
truth."

Revision 1.138: download - view: text, markup, annotated - select for diffs
Sun May 11 20:16:12 2008 UTC (16 years, 8 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +6 -5 lines
Use memset() instead of Bzero().

In arplookup1(), put the static sockaddr_inarp onto the stack, and
zero it before use.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Sun May 4 07:22:14 2008 UTC (16 years, 8 months ago) by thorpej
Branches: MAIN
Branch point for: wrstuden-revivesa
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +3 -8 lines
Simplify the interface to netstat_sysctl() and allocate space for
the collated counters using kmem_alloc().

PR kern/38577

Revision 1.136: download - view: text, markup, annotated - select for diffs
Fri May 2 13:40:32 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +4 -6 lines
PR kern/38497 Out of memory allocating ksiginfo

Work around: don't acquire softnet_lock in protocol drain routines.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:09 2008 UTC (16 years, 9 months ago) by martin
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.134: download - view: text, markup, annotated - select for diffs
Thu Apr 24 11:38:37 2008 UTC (16 years, 9 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +23 -8 lines
Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Wed Apr 23 05:26:50 2008 UTC (16 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +12 -43 lines
Use <net/net_stats.h> / netstat_sysctl().

Revision 1.132: download - view: text, markup, annotated - select for diffs
Tue Apr 15 15:17:54 2008 UTC (16 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +102 -32 lines
Make ARP stats per-cpu.

Revision 1.131.8.1: download - view: text, markup, annotated - select for diffs
Sat Mar 29 20:47:02 2008 UTC (16 years, 10 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +7 -6 lines
Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.126.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:06 2008 UTC (16 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.126.2.2: preferred, colored; next MAIN 1.127: preferred, colored
Changes since revision 1.126.2.2: +2 -6 lines
sync with HEAD

Revision 1.128.6.3: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:07:08 2008 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.128.6.2: preferred, colored; branchpoint 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128.6.2: +2 -6 lines
Sync with HEAD.

Revision 1.130.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 23 19:27:45 2008 UTC (17 years ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.130: preferred, colored; next MAIN 1.131: preferred, colored
Changes since revision 1.130: +2 -6 lines
Sync with HEAD.

Revision 1.106.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:47:12 2008 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.106.2.5: preferred, colored; branchpoint 1.106: preferred, colored; next MAIN 1.107: preferred, colored
Changes since revision 1.106.2.5: +15 -10 lines
sync with head

Revision 1.131: download - view: text, markup, annotated - select for diffs
Sun Jan 20 18:09:12 2008 UTC (17 years ago) by joerg
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, ad-socklock-base1
Branch point for: mjf-devfs2, christos-time_t
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -6 lines
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.

Revision 1.126.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:57:23 2008 UTC (17 years ago) by matt
Branches: matt-armv6
Diff to: previous 1.126.2.1: preferred, colored
Changes since revision 1.126.2.1: +17 -8 lines
sync with HEAD

Revision 1.125.4.3: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:36 2007 UTC (17 years, 1 month ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.125.4.2: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.4.2: +15 -6 lines
Sync with HEAD.

Revision 1.121.6.1: download - view: text, markup, annotated - select for diffs
Sun Dec 9 16:04:06 2007 UTC (17 years, 1 month ago) by reinoud
Branches: reinoud-bufcleanup
Diff to: previous 1.121: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121: +15 -6 lines
Pullup to HEAD

Revision 1.128.6.2: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:21:11 2007 UTC (17 years, 1 month ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.128.6.1: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.6.1: +15 -6 lines
Sync with HEAD.

Revision 1.129.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:55 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking2
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +15 -6 lines
Sync with head.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Fri Dec 7 19:46:18 2007 UTC (17 years, 1 month ago) by elad
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-merge1, bouyer-xeni386-base
Branch point for: bouyer-xeni386
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +15 -6 lines
Use struct initializers. No functional change.

Revision 1.128.6.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:49:08 2007 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +4 -4 lines
Sync with HEAD.

Revision 1.128.4.1: download - view: text, markup, annotated - select for diffs
Sun Nov 18 19:35:53 2007 UTC (17 years, 2 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128: +4 -4 lines
Sync with HEAD

Revision 1.106.2.5: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:45:06 2007 UTC (17 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.106.2.4: preferred, colored; branchpoint 1.106: preferred, colored
Changes since revision 1.106.2.4: +4 -4 lines
sync with head.

Revision 1.125.4.2: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:04:50 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.125.4.1: preferred, colored; branchpoint 1.125: preferred, colored
Changes since revision 1.125.4.1: +4 -4 lines
Sync with HEAD.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Nov 14 01:11:14 2007 UTC (17 years, 2 months ago) by cube
Branches: MAIN
CVS tags: vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +4 -4 lines
Follow up on arc -> arcnet renaming.  Pointed out by joerg@.

Revision 1.126.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:33:45 2007 UTC (17 years, 2 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +39 -31 lines
sync with HEAD

Revision 1.121.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:47 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.121.2.3: preferred, colored; branchpoint 1.121: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121.2.3: +116 -80 lines
Sync with head.

Revision 1.125.4.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:49:01 2007 UTC (17 years, 4 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +116 -80 lines
Sync with HEAD.

Revision 1.106.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:42:45 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.106.2.3: preferred, colored; branchpoint 1.106: preferred, colored
Changes since revision 1.106.2.3: +152 -131 lines
sync with head.

Revision 1.124.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:23:42 2007 UTC (17 years, 4 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.124.2.1: preferred, colored; branchpoint 1.124: preferred, colored; next MAIN 1.125: preferred, colored
Changes since revision 1.124.2.1: +116 -80 lines
Sync with HEAD.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Sun Sep 2 19:42:22 2007 UTC (17 years, 4 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +10 -7 lines
We cannot sleep in a software interrupt, so do not sockaddr_dl_alloc(...,
M_WAITOK).  Instead, sockaddr_dl_init() a sockaddr_dl on the stack.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu Aug 30 02:17:36 2007 UTC (17 years, 5 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +36 -31 lines
Use malloc(9) for sockaddrs instead of pool(9), and remove dom_sa_pool
and dom_sa_len members from struct domain.  Pools of fixed-size
objects are too rigid for sockaddr_dls, whose size can vary over
a wide range.

Return sockaddr_dl to its "historical" size.  Now that I'm using
malloc(9) instead of pool(9) to allocate sockaddr_dl, I can create
a sockaddr_dl of any size in the kernel, so expanding sockaddr_dl
is useless.

Avoid using sizeof(struct sockaddr_dl) in the kernel.

Introduce sockaddr_dl_alloc() for allocating & initializing an
arbitrary sockaddr_dl on the heap.

Add an argument, the sockaddr length, to sockaddr_alloc(),
sockaddr_copy(), and sockaddr_dl_setaddr().

Constify: LLADDR() -> CLLADDR().

Where the kernel overwrites LLADDR(), use sockaddr_dl_setaddr(),
instead.  Used properly, sockaddr_dl_setaddr() will not overrun
the end of the sockaddr.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Mon Aug 27 01:13:09 2007 UTC (17 years, 5 months ago) by dyoung
Branches: MAIN
Branch point for: matt-armv6
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +91 -63 lines
Reorganize and extract arplookup1() for code-sharing.  Share
null_sdl.  Introduce arp_setgate() for initializing a link-layer
nexthop, and use it to fulfill RTM_SETGATE requests.

Revision 1.121.2.3: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:27:57 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.121.2.2: preferred, colored; branchpoint 1.121: preferred, colored
Changes since revision 1.121.2.2: +13 -17 lines
Sync with HEAD.

Revision 1.124.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:43 2007 UTC (17 years, 5 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +13 -17 lines
Sync with HEAD.

Revision 1.125.6.2: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:54 2007 UTC (17 years, 6 months ago) by dyoung
Branches: matt-mips64
Diff to: previous 1.125.6.1: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.6.1: +1558 -0 lines
Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.125.6.1
Thu Jul 19 20:48:53 2007 UTC (17 years, 6 months ago) by dyoung
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.125: +0 -1558 lines
file if_arp.c was added on branch matt-mips64 on 2007-07-19 20:48:54 +0000

Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:53 2007 UTC (17 years, 6 months ago) by dyoung
Branches: MAIN
CVS tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +13 -17 lines
Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.121.2.2: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:27:56 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.121.2.1: preferred, colored; branchpoint 1.121: preferred, colored
Changes since revision 1.121.2.1: +6 -16 lines
Sync with head.

Revision 1.121.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:11:17 2007 UTC (17 years, 6 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.121: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121: +7 -17 lines
Sync with head.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:11:11 2007 UTC (17 years, 6 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +3 -3 lines
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.121.2.1: download - view: text, markup, annotated - select for diffs
Sun Jul 1 21:50:48 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +3 -3 lines
Adapt to callout API change.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Tue Jun 12 22:55:44 2007 UTC (17 years, 7 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +5 -13 lines
Complete removal of radix_node knowledge.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Sat Jun 9 03:07:22 2007 UTC (17 years, 7 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +6 -8 lines
Get rid of radix_node_head.rnh_walktree, because it is only ever
set to rn_walktree.

Introduce rt_walktree(), which applies a subroutine to every route
in a particular address family.  Use it instead of rn_walktree()
virtually everywhere.  This helps to hide the routing table
implementation.

Revision 1.118.2.3: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:59:35 2007 UTC (17 years, 10 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.118.2.2: preferred, colored; next MAIN 1.119: preferred, colored
Changes since revision 1.118.2.2: +30 -31 lines
Sync with HEAD.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:20 2007 UTC (17 years, 10 months ago) by christos
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +30 -31 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.118.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:52 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.118.2.1: preferred, colored
Changes since revision 1.118.2.1: +1573 -0 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.106.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:42 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.106.2.2: preferred, colored; branchpoint 1.106: preferred, colored
Changes since revision 1.106.2.2: +21 -20 lines
sync with head.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Thu Feb 22 04:38:02 2007 UTC (17 years, 11 months ago) by matt
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +3 -3 lines
Fix lossage from boolean_t -> bool and updated x86 bus_dma.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Sat Feb 17 22:34:10 2007 UTC (17 years, 11 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +16 -15 lines
KNF: de-__P, bzero -> memset, bcmp -> memcmp.  Remove extraneous
   parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
   in6_src.c, avoid casts by changing several route_in6 pointers
   to struct route pointers.  Remove unnecessary casts to caddr_t
   elsewhere.

Pave the way for eliminating address family-specific route caches:
   soon, struct route will not embed a sockaddr, but it will hold
   a reference to an external sockaddr, instead.  We will set the
   destination sockaddr using rtcache_setdst().  (I created a stub
   for it, but it isn't used anywhere, yet.)  rtcache_free() will
   free the sockaddr.  I have extracted from rtcache_free() a helper
   subroutine, rtcache_clear().  rtcache_clear() will "forget" a
   cached route, but it will not forget the destination by releasing
   the sockaddr.  I use rtcache_clear() instead of rtcache_free()
   in rtcache_update(), because rtcache_update() is not supposed
   to forget the destination.

Constify:

   1 Introduce const accessor for route->ro_dst, rtcache_getdst().

   2 Constify the 'dst' argument to ifnet->if_output().  This
     led me to constify a lot of code called by output routines.

   3 Constify the sockaddr argument to protosw->pr_ctlinput.  This
     led me to constify a lot of code called by ctlinput routines.

   4 Introduce const macros for converting from a generic sockaddr
     to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
     satocsin, et cetera.

Revision 1.118.2.1
Sat Feb 17 05:31:15 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-idlelwp
FILE REMOVED
Changes since revision 1.118: +0 -1572 lines
file if_arp.c was added on branch yamt-idlelwp on 2007-02-27 16:54:52 +0000

Revision 1.118: download - view: text, markup, annotated - select for diffs
Sat Feb 17 05:31:15 2007 UTC (17 years, 11 months ago) by dyoung
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +6 -6 lines
bcopy -> memcpy

Use NULL instead of (struct rtentry *)0.

Revision 1.113.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:14 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.113.2.1: preferred, colored; branchpoint 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.2.1: +3 -3 lines
Sync with head.

Revision 1.106.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:33 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.106.2.1: preferred, colored; branchpoint 1.106: preferred, colored
Changes since revision 1.106.2.1: +24 -15 lines
sync with head.

Revision 1.113.4.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:19:10 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.113.4.1: preferred, colored; branchpoint 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.4.1: +11 -14 lines
sync with head.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Fri Nov 24 19:37:03 2006 UTC (18 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-base-1, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, matt-nb4-arm-base, matt-nb4-arm
Branch point for: wrstuden-fixsa, netbsd-4-0, netbsd-4
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +3 -3 lines
fix spelling of accidentally; from Zapher

Revision 1.113.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:36 2006 UTC (18 years, 2 months ago) by ad
Branches: newlock2
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +6 -8 lines
Sync with head.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:45 2006 UTC (18 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +8 -8 lines
__unused removal on arguments; approved by core.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Mon Nov 13 05:13:41 2006 UTC (18 years, 2 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +4 -7 lines
Add a source-address selection policy mechanism to the kernel.

Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses.  Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

        1 Factor out some common code, producing rt_replace_ifa().

        2 Abbreviate a for-loop with TAILQ_FOREACH().

        3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
          IN_PRIVATE(), that are true for link-local unicast
          (169.254/16) and RFC1918 private addresses, respectively.
          Add the predicate IN_ANY_LOCAL() that is true for link-local
          unicast and multicast.

        4 Add IPv4-specific interface attach/detach routines,
          in_domifattach and in_domifdetach, which build #ifdef
          IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.

Revision 1.113.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:28 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +8 -7 lines
sync with head

Revision 1.114: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:32:37 2006 UTC (18 years, 3 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +8 -7 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.108.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:58:46 2006 UTC (18 years, 4 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.108: preferred, colored; next MAIN 1.109: preferred, colored
Changes since revision 1.108: +91 -38 lines
sync with head

Revision 1.108.8.3: download - view: text, markup, annotated - select for diffs
Sun Sep 3 15:25:42 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.108.8.2: preferred, colored; branchpoint 1.108: preferred, colored; next MAIN 1.109: preferred, colored
Changes since revision 1.108.8.2: +19 -8 lines
sync with head.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Wed Aug 30 15:45:54 2006 UTC (18 years, 5 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +19 -8 lines
Fix initializers

Revision 1.108.8.2: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:53:57 2006 UTC (18 years, 7 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.108.8.1: preferred, colored; branchpoint 1.108: preferred, colored
Changes since revision 1.108.8.1: +24 -14 lines
sync with head.

Revision 1.106.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:11:00 2006 UTC (18 years, 7 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +78 -36 lines
sync with head.

Revision 1.110.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 04:09:48 2006 UTC (18 years, 7 months ago) by chap
Branches: chap-midi
Diff to: previous 1.110: preferred, colored; next MAIN 1.111: preferred, colored
Changes since revision 1.110: +24 -14 lines
Sync with head.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Wed Jun 7 22:34:00 2006 UTC (18 years, 7 months ago) by kardel
Branches: MAIN
CVS tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +22 -14 lines
merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.108.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:46 2006 UTC (18 years, 7 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.108.6.1: preferred, colored; branchpoint 1.108: preferred, colored; next MAIN 1.109: preferred, colored
Changes since revision 1.108.6.1: +54 -20 lines
Sync with head.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Thu May 25 21:33:12 2006 UTC (18 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: simonb-timecounters-base
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +4 -2 lines
Make sure the mbuf is writable before trying to write to it.

Revision 1.108.12.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:44 2006 UTC (18 years, 8 months ago) by tron
Branches: peter-altq
Diff to: previous 1.108: preferred, colored; next MAIN 1.109: preferred, colored
Changes since revision 1.108: +52 -20 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.108.8.1: download - view: text, markup, annotated - select for diffs
Wed May 24 10:59:03 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +52 -20 lines
sync with head.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Thu May 18 09:05:51 2006 UTC (18 years, 8 months ago) by liamjfoy
Branches: MAIN
CVS tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +37 -12 lines
Integrate Common Address Redundancy Procotol (CARP) from OpenBSD

'pseudo-device	carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@

Revision 1.109: download - view: text, markup, annotated - select for diffs
Fri May 12 01:20:33 2006 UTC (18 years, 8 months ago) by mrg
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +17 -10 lines
since ar_tha() can return NULL, don't pass it directly to functions
that expect real addresses.  explicitly KASSERT() that it is not
NULL in the kernel and just avoid using it userland.

(the kernel could be more defensive about this, but, until now it
would have just crashed anyway.)

Revision 1.108.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 4 14:18:52 2006 UTC (18 years, 11 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +22 -14 lines
Adapt for timecounters: mostly use get*time(), use bintime's for timeout
calculations and use "time_second" instead of "time.tv_sec".

Revision 1.108: download - view: text, markup, annotated - select for diffs
Sat Dec 24 20:45:09 2005 UTC (19 years, 1 month ago) by perry
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base, elad-kernelauth
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +6 -6 lines
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:24:57 2005 UTC (19 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +2 -2 lines
merge ktrace-lwp.

Revision 1.92.2.9: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:11:07 2005 UTC (19 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.8: preferred, colored; next MAIN 1.93: preferred, colored
Changes since revision 1.92.2.8: +7 -12 lines
Sync with HEAD. Here we go again...

Revision 1.106: download - view: text, markup, annotated - select for diffs
Mon Jun 20 02:49:18 2005 UTC (19 years, 7 months ago) by atatat
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +3 -3 lines
Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Wed Jun 1 12:29:58 2005 UTC (19 years, 7 months ago) by drochner
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +3 -3 lines
need a "const"

Revision 1.104: download - view: text, markup, annotated - select for diffs
Sun May 29 21:39:21 2005 UTC (19 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +5 -10 lines
- remove local copy of hexdigits.
- sprinkle const
- use mem*() instead of b*()

Revision 1.100.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:33 2005 UTC (19 years, 9 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +50 -81 lines
sync with -current

Revision 1.101.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:36:38 2005 UTC (19 years, 10 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.101.2.1: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.2.1: +3 -3 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.92.2.8: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:53:29 2005 UTC (19 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.7: preferred, colored
Changes since revision 1.92.2.7: +3 -3 lines
Sync with HEAD.

Hi Perry!

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sat Feb 26 22:45:12 2005 UTC (19 years, 11 months ago) by perry
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, kent-audio2-base
Branch point for: netbsd-3-1, netbsd-3-0, netbsd-3
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +3 -3 lines
nuke trailing whitespace

Revision 1.101.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 12 18:17:53 2005 UTC (19 years, 11 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +46 -77 lines
sync with head.

Revision 1.92.2.7: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:47:45 2005 UTC (19 years, 11 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.6: preferred, colored
Changes since revision 1.92.2.6: +46 -77 lines
Sync with HEAD.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Wed Feb 2 21:41:01 2005 UTC (19 years, 11 months ago) by perry
Branches: MAIN
CVS tags: yamt-km-base2
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +46 -77 lines
de-__P, do some ANSIfication.

Revision 1.92.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 24 08:35:53 2005 UTC (20 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.5: preferred, colored
Changes since revision 1.92.2.5: +5 -5 lines
Sync with HEAD.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun Jan 23 18:41:57 2005 UTC (20 years ago) by matt
Branches: MAIN
CVS tags: yamt-km-base
Branch point for: yamt-km
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +5 -5 lines
Change initialzie of domains to use link sets.  Switch to using STAILQ.
Add a convenience macro DOMAIN_FOREACH to interate through the domain.

Revision 1.92.2.5: download - view: text, markup, annotated - select for diffs
Sat Dec 18 09:33:05 2004 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.4: preferred, colored
Changes since revision 1.92.2.4: +4 -10 lines
Sync with HEAD.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Sat Dec 4 16:10:25 2004 UTC (20 years, 1 month ago) by peter
Branches: MAIN
CVS tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +4 -10 lines
Convert lo(4) to a clonable device.

This also removes the loif array and changes all code to use the new
lo0ifp pointer which points to the lo0 ifnet structure.

Approved by christos.

Revision 1.92.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 19 15:58:11 2004 UTC (20 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.3: preferred, colored
Changes since revision 1.92.2.3: +13 -10 lines
Sync with HEAD

Revision 1.99: download - view: text, markup, annotated - select for diffs
Wed Sep 29 21:26:52 2004 UTC (20 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +13 -10 lines
PR/21902: Sean Boudreau: arplookup() incrementing arpstat.as_allocfail
erroneously.

Revision 1.92.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:37:10 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.2: preferred, colored
Changes since revision 1.92.2.2: +2 -2 lines
Fix the sync with head I botched.

Revision 1.92.2.2: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:54:53 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92.2.1: preferred, colored
Changes since revision 1.92.2.1: +0 -0 lines
Sync with HEAD.

Revision 1.92.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:54:36 2004 UTC (20 years, 5 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +80 -12 lines
Sync with HEAD

Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue May 25 04:33:59 2004 UTC (20 years, 8 months ago) by atatat
Branches: MAIN
CVS tags: BEFORE-IPF413
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +12 -7 lines
Sysctl descriptions under net subtree (net.key not done)

Revision 1.97: download - view: text, markup, annotated - select for diffs
Wed Apr 28 14:09:36 2004 UTC (20 years, 9 months ago) by ragge
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +65 -3 lines
Send an arp request before the arp entry times out if the entry is active,
to avoid deleting active entries.
Add sysctl support to tune the default arp timeout values.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Thu Apr 22 01:01:40 2004 UTC (20 years, 9 months ago) by matt
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -3 lines
Constify protosw arrays.  This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Wed Apr 21 04:17:29 2004 UTC (20 years, 9 months ago) by matt
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +4 -4 lines
Constify if.c radix.c and route.c (and fix related fallout).

Revision 1.69.4.1: download - view: text, markup, annotated - select for diffs
Wed Oct 1 09:07:47 2003 UTC (21 years, 4 months ago) by msaitoh
Branches: netbsd-1-5
Diff to: previous 1.69: preferred, colored; next MAIN 1.70: preferred, colored
Changes since revision 1.69: +7 -2 lines
Pull up revision 1.94 via patch (requested by itojun in ticket #86):
 On arplookup() failure, nuke cloned route - otherwise outsider could use
 massive number of bogus ARPs for DoS attack.  FreeBSD-SA-03:14.arp

Revision 1.79.10.1: download - view: text, markup, annotated - select for diffs
Wed Oct 1 06:08:59 2003 UTC (21 years, 4 months ago) by tron
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Diff to: previous 1.79: preferred, colored; next MAIN 1.80: preferred, colored
Changes since revision 1.79: +8 -3 lines
Pull up revision 1.94 via patch (requested by itojun in ticket #1482):
on arplookup() failure, nuke cloned route - otherwise outsider could use massive
number of bogus ARPs for DoS attack.  FreeBSD-SA-03:14.arp

Revision 1.94: download - view: text, markup, annotated - select for diffs
Wed Sep 24 06:52:47 2003 UTC (21 years, 4 months ago) by itojun
Branches: MAIN
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, BEFORE-IPF411
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +8 -3 lines
on arplookup() failure, nuke cloned route - otherwise outsider could use massive
number of bogus ARPs for DoS attack.  FreeBSD-SA-03:14.arp

Revision 1.93: download - view: text, markup, annotated - select for diffs
Thu Aug 7 16:33:08 2003 UTC (21 years, 5 months ago) by agc
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -7 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Wed Feb 26 06:31:14 2003 UTC (21 years, 11 months ago) by matt
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +7 -2 lines
Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.72.2.7: download - view: text, markup, annotated - select for diffs
Wed Dec 11 06:46:36 2002 UTC (22 years, 1 month ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.72.2.6: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72.2.6: +1 -1 lines
Sync with HEAD.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Wed Nov 20 03:52:08 2002 UTC (22 years, 2 months ago) by dyoung
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -3 lines
Squash a panic: do not try to print the name of a NULL interface.

Revision 1.72.2.6: download - view: text, markup, annotated - select for diffs
Mon Nov 11 22:15:12 2002 UTC (22 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.72.2.5: preferred, colored
Changes since revision 1.72.2.5: +2 -2 lines
Catch up to -current

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sat Nov 2 07:28:11 2002 UTC (22 years, 2 months ago) by perry
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +4 -4 lines
/*CONTCOND*/ while (0)'ed macros

Revision 1.76.2.4: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:49:07 2002 UTC (22 years, 4 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.76.2.3: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76.2.3: +105 -31 lines
sync kqueue branch with HEAD

Revision 1.72.2.5: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:46:45 2002 UTC (22 years, 6 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.72.2.4: preferred, colored
Changes since revision 1.72.2.4: +105 -31 lines
Catch up to -current.

Revision 1.79.8.2: download - view: text, markup, annotated - select for diffs
Mon Jul 15 10:36:54 2002 UTC (22 years, 6 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.79.8.1: preferred, colored; branchpoint 1.79: preferred, colored; next MAIN 1.80: preferred, colored
Changes since revision 1.79.8.1: +105 -31 lines
catch up with -current.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Tue Jun 25 04:16:31 2002 UTC (22 years, 7 months ago) by enami
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gehenna-devsw-base
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +10 -5 lines
If we need to fix up ar_hrd field, we must do it before using ar_tpa/tha.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Tue Jun 25 04:04:53 2002 UTC (22 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +4 -8 lines
in arprequest(), fill ar_hrd only for IEEE1394.  for other cases,
ifp->if_output will fill it for us.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Jun 25 02:55:14 2002 UTC (22 years, 7 months ago) by enami
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +2 -3 lines
No need to include same file twice.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Jun 25 02:53:27 2002 UTC (22 years, 7 months ago) by enami
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +13 -14 lines
Use if_addrlen macro rather than if_data.ifi_addrlen.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Mon Jun 24 21:25:34 2002 UTC (22 years, 7 months ago) by enami
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +17 -4 lines
The ieee1394 arp reply should be broadcast.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Mon Jun 24 10:52:15 2002 UTC (22 years, 7 months ago) by enami
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +13 -6 lines
Don't use a pointer before it is initialized.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Mon Jun 24 08:42:33 2002 UTC (22 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +8 -3 lines
set ar_hrd for RFC-defined cases

Revision 1.82: download - view: text, markup, annotated - select for diffs
Mon Jun 24 08:06:22 2002 UTC (22 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +64 -14 lines
integrate IEEE1394 ARP into generic ARP logic.
XXX there's no check at all in ar_hrd, and we don't set ar_hrd on outgoing.
it seems like a bad thing.

Revision 1.76.2.3: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:50:40 2002 UTC (22 years, 7 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.76.2.2: preferred, colored
Changes since revision 1.76.2.2: +70 -33 lines
catch up with -current on kqueue branch

Revision 1.79.8.1: download - view: text, markup, annotated - select for diffs
Thu Jun 20 15:52:12 2002 UTC (22 years, 7 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +70 -33 lines
catch up with -current.

Revision 1.72.2.4: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:48:30 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.72.2.3: preferred, colored
Changes since revision 1.72.2.3: +70 -33 lines
Catch up to -current.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Jun 9 16:33:37 2002 UTC (22 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +19 -19 lines
whitespace

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sun Jun 9 05:09:26 2002 UTC (22 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +53 -16 lines
enforce IPv4 link MTU for FDDI and ARCNET even in RTF_GATEWAY case.
PR 17151.

Revision 1.76.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 10 20:02:38 2002 UTC (23 years ago) by thorpej
Branches: kqueue
Diff to: previous 1.76.2.1: preferred, colored
Changes since revision 1.76.2.1: +4 -1 lines
Sync kqueue branch with -current.

Revision 1.72.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:17:41 2001 UTC (23 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.72.2.2: preferred, colored
Changes since revision 1.72.2.2: +4 -1 lines
Catch up to -current.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Nov 13 00:32:35 2001 UTC (23 years, 2 months ago) by lukem
Branches: MAIN
CVS tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +4 -1 lines
add RCSIDs

Revision 1.76.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 25 06:17:01 2001 UTC (23 years, 5 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +33 -2 lines
Merge Aug 24 -current into the kqueue branch.

Revision 1.72.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:12:22 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.72.2.1: preferred, colored
Changes since revision 1.72.2.1: +57 -4 lines
Catch up with -current.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Mon Aug 20 03:13:45 2001 UTC (23 years, 5 months ago) by itojun
Branches: MAIN
CVS tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +6 -2 lines
if I'm bridging and got a packet to interface address on if A from if B,
advertise MAC address for if A with ARP reply.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Fri Aug 17 21:47:57 2001 UTC (23 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +29 -2 lines
Permit weaker interface matches for incoming ARP packets if the packet was
received on an interface that is part of a bridge and we find an ifaddr on
an interface that is part of the same bridge.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Wed Jul 4 02:29:58 2001 UTC (23 years, 6 months ago) by itojun
Branches: MAIN
Branch point for: kqueue
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +25 -3 lines
better support for multiple IPv4 addresses on a single interface.
- consider non-primary (2nd and beyond) IPv4 address as "local", and prevent
  outgoing ARP.
- for routing entries generated by ARP, make sure to set rt->rt_ifa equal to
  rt_key, to help IPv4 source address selection for traffic to myself.
PR 13311.

caveats/TODOs:
- interface routes ("connected routes" in cisco terminlogy) is tied with the
  primary (1st) IPv4 address on the interface.  should be fixed with updates
  to rt_ifinit().
- source address selection for offlink locations.  1st address tend to be used
  with the current code
  (you can configure it right by setting rt->rt_ifa accordingly).

Revision 1.72.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 21 20:08:30 2001 UTC (23 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +37 -23 lines
Catch up to -current.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon Jun 11 06:19:50 2001 UTC (23 years, 7 months ago) by tron
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +21 -11 lines
Make arplookup error messages more informative. Patch supplied by
Andrew Brown in PR kern/13162.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Mon May 14 19:50:43 2001 UTC (23 years, 8 months ago) by matt
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +5 -5 lines
Use the LIST_NEXT & LIST_FIRST macros instead of refering to
le_next & lh_first.

Revision 1.66.2.4: download - view: text, markup, annotated - select for diffs
Sat Apr 21 17:46:46 2001 UTC (23 years, 9 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.66.2.3: preferred, colored; branchpoint 1.66: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66.2.3: +13 -9 lines
Sync with HEAD

Revision 1.73: download - view: text, markup, annotated - select for diffs
Fri Apr 13 23:30:21 2001 UTC (23 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +13 -9 lines
Remove the use of splimp() from the NetBSD kernel.  splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.

Revision 1.66.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:17:12 2001 UTC (23 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.66.2.2: preferred, colored; branchpoint 1.66: preferred, colored
Changes since revision 1.66.2.2: +4 -2 lines
Sync with HEAD.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Jan 26 11:40:32 2001 UTC (24 years ago) by is
Branches: MAIN
Branch point for: nathanw_sa
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +4 -2 lines
Make diagnostic actually useful - needed to debug other ARP PRs.
Suggested by Geoff C. Wing in PR 10815.

Revision 1.66.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 18 09:23:55 2001 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.66.2.1: preferred, colored; branchpoint 1.66: preferred, colored
Changes since revision 1.66.2.1: +3 -3 lines
Sync with head (for UBC+NFS fixes, mostly).

Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Jan 17 04:05:44 2001 UTC (24 years ago) by itojun
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -3 lines
pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).

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.

Revision 1.66.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:10:19 2000 UTC (24 years, 2 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +90 -43 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Aug 15 20:24:57 2000 UTC (24 years, 5 months ago) by jhawk
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +51 -12 lines
Add kernel counters for arp events, displayable with netstat -s -f arp

Revision 1.56.2.4: download - view: text, markup, annotated - select for diffs
Sun Jul 2 21:45:32 2000 UTC (24 years, 6 months ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003
Diff to: previous 1.56.2.3: preferred, colored; branchpoint 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.2.3: +32 -12 lines
Apply patch (partially revision 1.63, requested by sommerfeld):
  Protect arp table handling with splnet() to avoid interrupt races
  when ip_flow is in use.  Fixes PR#10351.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sat May 20 03:08:42 2000 UTC (24 years, 8 months ago) by jhawk
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +10 -6 lines
Install "show arptab" (db_show_arptab) in the ddb command tree.
Move prototype from netinet/if_inarp.h to ddb/db_interface.h.
Change function to have standard ddb parameters (though they're
ignored).

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu Mar 30 13:24:52 2000 UTC (24 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +25 -25 lines
Remove register declarations.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Thu Mar 23 07:03:28 2000 UTC (24 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +7 -3 lines
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.56.2.2.4.1: download - view: text, markup, annotated - select for diffs
Tue Nov 30 13:35:21 1999 UTC (25 years, 2 months ago) by itojun
Branches: kame
CVS tags: kame_141_19991130
Diff to: previous 1.56.2.2: preferred, colored; next MAIN 1.56.2.3: preferred, colored
Changes since revision 1.56.2.2: +7 -1 lines
bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Sep 25 17:49:29 1999 UTC (25 years, 4 months ago) by is
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +22 -1 lines
Decouple IP mtu for ARCnet devices from interface MTU.
This is important, because for most protocols, link level fragmentation is
used, but with different default effective MTUs. (e.g.: IPv4 default MTU
is 1500 octets, IPv6 default MTU is 9072 octets).

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Aug 21 03:46:35 1999 UTC (25 years, 5 months ago) by matt
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +13 -1 lines
Cleanup a little kludge in mtu handling in route.c.  Bring down FDDI
mtu to legal IP max but don't affect other protocols.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Thu Aug 5 04:36:56 1999 UTC (25 years, 5 months ago) by sommerfeld
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -6 lines
Delete debug printfs from arp_drain()

Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Aug 5 04:04:29 1999 UTC (25 years, 5 months ago) by sommerfeld
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +173 -12 lines
Implement arp_drain(), which frees packets tied up in the arp cache if
mbufs are in short supply.
Create a (trivial) protocol domain for arp so that the drain routine will
be called from m_reclaim()

Revision 1.56.2.2.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 01:27:47 1999 UTC (25 years, 7 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.56.2.2: preferred, colored; next MAIN 1.56.2.3: preferred, colored
Changes since revision 1.56.2.2: +27 -15 lines
Sync w/ -current.

Revision 1.56.2.3: download - view: text, markup, annotated - select for diffs
Sun Jun 20 19:20:33 1999 UTC (25 years, 7 months ago) by perry
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Diff to: previous 1.56.2.2: preferred, colored; branchpoint 1.56: preferred, colored
Changes since revision 1.56.2.2: +3 -1 lines
pullup 1.61->1.62 (thorpej)

Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Jun 18 18:20:50 1999 UTC (25 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -1 lines
When sending an ARP reply, make sure to set the length of the outgoing
packet.

Slightly modified from PR #7809, Zdenek Salvet <salvet@ics.muni.cz>.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun May 30 00:39:07 1999 UTC (25 years, 8 months ago) by bad
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +20 -14 lines
Fix thinko of mine in previous.  The source route info is not at m->m_data
after various m_adj()s have been done.  Kludge around this with a cheesy
macro that knows where the drivers put the mac header in the first mbuf.

XXX There should be a better way to do this.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat May 29 22:36:08 1999 UTC (25 years, 8 months ago) by bad
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +4 -4 lines
Don't assume the Token-Ring source route is in the m_pktdat.  Use
m_data instead.  This isn't a problem with ARP packets but is correct
way to this.

Noticed by pmara@cactus.org (Shashi Mara).

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sun May 23 20:21:51 1999 UTC (25 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +5 -1 lines
For completeness sake, allow this to compile with no loopback interfaces
configured.

Revision 1.56.2.2: download - view: text, markup, annotated - select for diffs
Tue May 4 22:28:45 1999 UTC (25 years, 8 months ago) by perry
Branches: netbsd-1-4
CVS tags: netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: kame, chs-ubc2
Diff to: previous 1.56.2.1: preferred, colored; branchpoint 1.56: preferred, colored
Changes since revision 1.56.2.1: +9 -2 lines
pullup 1.57->1.58 (is)

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue May 4 20:50:35 1999 UTC (25 years, 8 months ago) by is
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +9 -2 lines
Fixes PR 7489 by Olaf Seibert. Fix by Zdenek Salvet (PR 7497).

Revision 1.56.2.1: download - view: text, markup, annotated - select for diffs
Tue May 4 20:01:32 1999 UTC (25 years, 8 months ago) by perry
Branches: netbsd-1-4
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +17 -5 lines
pullup 1.56->1.57 (is)

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue May 4 14:58:27 1999 UTC (25 years, 8 months ago) by is
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +17 -5 lines
Fix for PR 7490 by Olaf Seibert, fix mostly from PR 7497 bei Zdenek Salvet,
but with more verbose error messages.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Mar 22 22:30:42 1999 UTC (25 years, 10 months ago) by bad
Branches: MAIN
CVS tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +37 -3 lines
Add support for Token-Ring source routes in the ARP cache.

By Onno van der Linden.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sun Feb 21 15:17:14 1999 UTC (25 years, 11 months ago) by drochner
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +12 -20 lines
-always do an RARP if revarpwhoarewe() is called, it might be for another
 interface or the server's configuration has changed
-g/c revarpwhoami()

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Dec 19 02:46:12 1998 UTC (26 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +38 -38 lines
Reverse the copyright-notice-swap.  It went against existing practice.

Revision 1.53.4.1: download - view: text, markup, annotated - select for diffs
Fri Dec 11 04:53:07 1998 UTC (26 years, 1 month ago) by kenh
Branches: kenh-if-detach
Diff to: previous 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53: +16 -6 lines
The beginnings of interface detach support.  Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.

Revision 1.41.2.2: download - view: text, markup, annotated - select for diffs
Thu Oct 1 17:56:11 1998 UTC (26 years, 4 months ago) by cgd
Branches: netbsd-1-3
CVS tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003
Diff to: previous 1.41.2.1: preferred, colored; branchpoint 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.2.1: +63 -15 lines
pull up revisions 1.43-1.45, 1.47-1.49, 1.52 from trunk. (tls)

Revision 1.53: download - view: text, markup, annotated - select for diffs
Thu Oct 1 11:04:24 1998 UTC (26 years, 4 months ago) by drochner
Branches: MAIN
CVS tags: kenh-if-detach-base, chs-ubc-base, chs-ubc
Branch point for: kenh-if-detach
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +17 -9 lines
print reason for arplookup() failure (ala FreeBSD)

Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Sep 30 21:52:24 1998 UTC (26 years, 4 months ago) by tls
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +38 -38 lines
Switch order of TNF and UCB copyrights so UCB copyright is first; this seems more appropriate since UCB wrote the original code, after all.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Jul 5 00:51:28 1998 UTC (26 years, 6 months ago) by jonathan
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -1 lines
defopt INET, NETATALK.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Jul 4 22:18:52 1998 UTC (26 years, 6 months ago) by jonathan
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -1 lines
defopt DDB.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Jul 2 14:00:39 1998 UTC (26 years, 7 months ago) by is
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +11 -8 lines
Thinko in last fix: we have to actually check each address for a copy on
our ifp, else we might fail for some strange configurations.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu Jul 2 11:39:56 1998 UTC (26 years, 7 months ago) by is
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +9 -6 lines
The rewrite of if_arp.c to work with the hashed interface address lists
(1.44) missed a test for the right interface, making some machines answer
to some bogus arp requests (like for WHO-HAS 127.0.0.1).

The quick patch in 1.46-1.47 does not work for so-called "unnumbered"
interfaces, that is, (point-to-point) interfaces that share their local
address with another (e.g., the Ethernet) interface.

We add a macro to in_var.h, to step (in the current implementation) through
the hash chain and fine more entries with the same address, and use that
in if_arp.c to find one which belongs to our interface.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Jun 25 20:47:48 1998 UTC (26 years, 7 months ago) by tls
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -1 lines
Fix buglet where we might respond to arp on wrong interface.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri May 29 15:34:25 1998 UTC (26 years, 8 months ago) by matt
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +13 -13 lines
Change arp so its console log messages print out IP addresses in
dotted quad format instead of hex.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Feb 15 18:24:23 1998 UTC (26 years, 11 months ago) by tls
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +38 -1 lines
Add correct copyright notice for IP address hash change.  This code is donated to TNF by the original copyright holder, Panix.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Feb 13 18:21:38 1998 UTC (26 years, 11 months ago) by tls
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +18 -15 lines
Change list of interface IP addresses to a hash.  Improves performance on hosts with a large number of IP addresses significantly.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Jan 5 10:31:44 1998 UTC (27 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -2 lines
Finishing merging 4.4BSD-Lite2 netinet.  At this point, the only changes
left were SCCS IDs and Copyright dates.

Revision 1.41.2.1: download - view: text, markup, annotated - select for diffs
Fri Oct 31 07:47:44 1997 UTC (27 years, 3 months ago) by mellon
Branches: netbsd-1-3
CVS tags: netbsd-1-3-RELEASE, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +13 -10 lines
Pull rev 1.42 up from trunk (gwr)

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Oct 31 02:54:08 1997 UTC (27 years, 3 months ago) by gwr
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +13 -10 lines
Get rid of the messages: "arp: zero IP addr from ..."
If one really wants to know about those confused PCs
trying to use IP address zero, they can use tcpdump.

Revision 1.38.4.3: download - view: text, markup, annotated - select for diffs
Tue Oct 14 10:29:21 1997 UTC (27 years, 3 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.38.4.2: preferred, colored; branchpoint 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38.4.2: +10 -11 lines
Update marc-pcmcia branch from trunk.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu Oct 2 19:42:02 1997 UTC (27 years, 4 months ago) by is
Branches: MAIN
CVS tags: netbsd-1-3-base, marc-pcmcia-base
Branch point for: netbsd-1-3
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +10 -11 lines
Reimplement a test for broadcast addresses advertized, which was left out
when rewriting the ARP system.

Revision 1.38.4.2: download - view: text, markup, annotated - select for diffs
Mon Sep 1 21:00:36 1997 UTC (27 years, 5 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.38.4.1: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.1: +25 -6 lines
Update marc-pcmcia branch from trunk.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Aug 29 16:02:41 1997 UTC (27 years, 5 months ago) by gwr
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +25 -6 lines
Tweaks to allow operation with an interface address of 0.0.0.0
(needed for NFS mountroot using BOOTP to get boot parameters)

Revision 1.38.4.1: download - view: text, markup, annotated - select for diffs
Sat Aug 23 07:14:19 1997 UTC (27 years, 5 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -3 lines
Update marc-pcmcia branch from trunk.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Aug 4 06:18:49 1997 UTC (27 years, 5 months ago) by lukem
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -3 lines
struct loif is an array of NLOOP (from "loop.h") elements

Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue May 27 23:14:44 1997 UTC (27 years, 8 months ago) by gwr
Branches: MAIN
CVS tags: marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +11 -12 lines
Allow revarpwhoami() to be called multiple times.
(Just return the answer if we already have it.)
Without this, the RB_ASKNAME loop fails on every
call to nfs_mountroot after the first call.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Apr 7 01:48:30 1997 UTC (27 years, 9 months ago) by jtk
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
add newlines at end of debugging log messages which were missing them

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Mar 23 01:24:03 1997 UTC (27 years, 10 months ago) by is
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -2 lines
Fix several bugs related to  the new ARP code, and ARCnet ARP support.
Among other, add ARPHRD_ARCNET definition, make sure the hardware type is
set on outgoing ARP packets, make sure we dont send out replies as broadcasts.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Mar 15 18:12:31 1997 UTC (27 years, 10 months ago) by is
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +180 -148 lines
New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.

Revision 1.34.4.1: download - view: text, markup, annotated - select for diffs
Sun Mar 9 20:54:06 1997 UTC (27 years, 10 months ago) by is
Branches: is-newarp
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +180 -148 lines
netinet/if_ether.h -> netinet/if_inarp.h

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Oct 13 02:03:00 1996 UTC (28 years, 3 months ago) by christos
Branches: MAIN
CVS tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base
Branch point for: is-newarp
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
backout previous kprintf changes

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Oct 10 23:12:43 1996 UTC (28 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
printf -> kprintf, sprintf -> ksprintf

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Oct 9 01:15:04 1996 UTC (28 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +1 -1 lines
Merge netbsd-1-2 branch back into mainline.

Revision 1.31.4.2
Sat Aug 31 21:34:32 1996 UTC (28 years, 5 months ago) by thorpej
Branches: netbsd-1-2
CVS tags: netbsd-1-2-PATCH001
FILE REMOVED
Changes since revision 1.31.4.1: +1 -1 lines
Delete these from the NetBSD 1.2 release branch; they were tagged in error.

Revision 1.31.4.1
Fri Jun 14 10:32:31 1996 UTC (28 years, 7 months ago) by is
Branches: netbsd-1-2
CVS tags: netbsd-1-2-BETA
FILE REMOVED
Changes since revision 1.31: +1 -1 lines
Not needed for the netbsd-1-2 release

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat May 11 12:59:55 1996 UTC (28 years, 8 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-2-base
Branch point for: netbsd-1-2
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +9 -15 lines
When sending an ARP request, use the interface address for the route, rather
than the first address assigned.  This gives slightly different behaviour in
the presence of aliases.  From Bill Fenner, via Pete Bentley.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue May 7 02:40:41 1996 UTC (28 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -4 lines
Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Mar 30 21:53:19 1996 UTC (28 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +7 -7 lines
Fix db_printf formats

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Feb 13 23:40:59 1996 UTC (28 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +23 -4 lines
netinet prototypes

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Aug 12 23:59:29 1995 UTC (29 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -2 lines
splnet --> splsoftnet

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Jun 12 00:47:23 1995 UTC (29 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +13 -12 lines
Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Jun 4 05:06:49 1995 UTC (29 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
Clean up many more casts.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon May 15 01:30:44 1995 UTC (29 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +17 -14 lines
spacing fixups and KNF.  #define ether address size, so it's not
hardcoded as '6' all over.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Apr 17 05:32:52 1995 UTC (29 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +5 -5 lines
spacing cleaup. also, minor type mixup fixups.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Apr 13 06:25:36 1995 UTC (29 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +7 -6 lines
be a bit more careful and explicit with types.  (basically a large no-op.)

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Apr 11 04:30:52 1995 UTC (29 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -2 lines
Remove some explicit references to loif.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Apr 7 22:26:04 1995 UTC (29 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +16 -2 lines
Add a common function to initialize ARP-related variables.  `Insired'
by Garrett Wollman.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Mar 6 19:06:09 1995 UTC (29 years, 10 months ago) by glass
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -2 lines
remove references to arptnew.  fix spelling error

Revision 1.16.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 28 05:19:51 1994 UTC (30 years, 6 months ago) by cgd
Diff to: previous 1.16.2.1: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.2.1: +4 -4 lines
from trunk.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Jul 27 12:36:09 1994 UTC (30 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -4 lines
Fix byte-order bug in printf() statement.

Revision 1.16.2.1: download - view: text, markup, annotated - select for diffs
Sun Jul 24 02:48:29 1994 UTC (30 years, 6 months ago) by cgd
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -2 lines
from trunk.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Jul 24 02:41:27 1994 UTC (30 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -2 lines
kill conflicting externs

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:37:54 1994 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -2 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Jun 21 03:54:27 1994 UTC (30 years, 7 months ago) by chopps
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -1 lines
config.new hack for if_ether.c for lack of an `and' in the grammer
and protect some ether specific code in in.c

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Jun 4 03:15:09 1994 UTC (30 years, 8 months ago) by gwr
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +19 -23 lines
Back out some of my changes which Keith Sklower convinced me are
unnecessary.  Leaving in just the essentials of the fix.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Jun 3 02:54:26 1994 UTC (30 years, 8 months ago) by gwr
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +179 -26 lines
Avoid accidentaly creating permanent entries at time==0
Routes created with RTM_ADD (i.e. manually added) are
permanent so leave their expiration time set to zero.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri May 13 06:05:55 1994 UTC (30 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +358 -421 lines
Update to 4.4-Lite networking code, with a few local changes.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Apr 29 23:16:41 1994 UTC (30 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -2 lines
change timeout/untimeout/wakeup/sleep/tsleep args to void *

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Apr 18 23:25:57 1994 UTC (30 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -1 lines
Dummy arpintr() for now.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Apr 18 06:18:16 1994 UTC (30 years, 9 months ago) by glass
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +157 -1 lines
revised nfs diskless support.  uses bootp+rpc to gather parameters

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Feb 2 05:58:50 1994 UTC (31 years ago) by hpeyerl
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -3 lines
Multicast is no longer optional.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Jan 23 23:42:50 1994 UTC (31 years ago) by deraadt
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
ether_output() & ether_input() take ether_type as a net-short.
AF_UNSPEC does not swap byte order of ether_type.
NOTE: this requires driver changes

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Jan 8 21:21:29 1994 UTC (31 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -6 lines
Fix some inconsistent spacing; spaces at the end of lines, etc.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Dec 18 00:41:48 1993 UTC (31 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +18 -17 lines
Canonicalize all #includes.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Dec 12 20:43:06 1993 UTC (31 years, 1 month ago) by hpeyerl
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +7 -1 lines
>From cmaeda@cs.washington.edu; part of the multicast patches derived
from the Multicast patches for BSDI.

Thanx to Brad Parker for making me realize i'd forgotten to commit
this patch..(color me dopey)

Revision 1.3.4.1: download - view: text, markup, annotated - select for diffs
Fri Sep 24 08:54:50 1993 UTC (31 years, 4 months ago) by mycroft
Diff to: previous 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3: +3 -1 lines
Make all files using spl*() #include cpu.h.  Changes from trunk.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Jun 27 06:02:37 1993 UTC (31 years, 7 months ago) by andrew
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -2 lines
ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu May 20 03:49:56 1993 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -1 lines
more rcsid additions and file header cleanups

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 10 months ago) by cgd
Branches: WJF-920714
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 10 months ago) by cgd
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>