<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sbin/pfctl/pfctl_parser.c, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sbin/pfctl/pfctl_parser.c?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sbin/pfctl/pfctl_parser.c?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2020-05-15T00:56:03Z</updated>
<entry>
<title>pf(4): use CLOCK_BOOTTIME to get time_uptime(9) in userspace</title>
<updated>2020-05-15T00:56:03Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2020-05-15T00:56:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=e45b97acc68240287380c19ce0d763926c796dbd'/>
<id>urn:sha1:e45b97acc68240287380c19ce0d763926c796dbd</id>
<content type='text'>
In pf(4), the pf_status.since timestamp is set with time_uptime(9).
This is a low-res snapshot of nanouptime(9).  nanouptime(9) is used to
implement CLOCK_BOOTTIME for clock_gettime(2).  It is not used to
implement CLOCK_UPTIME, though.  The names are misleading.

Switch to CLOCK_BOOTTIME in places in userspace where we use
pf_status.since so we are working with the right clock.

Technically CLOCK_MONOTONIC is equivalent, but we shouldn't use that
here.  CLOCK_MONOTONIC is not necessarily the "time since boot": the
standard says its absolute value is meaningless.

ok patrick@ bluhm@
</content>
</entry>
<entry>
<title>Use -1 to indicate an invalid uid/gid, not UID_MAX and GID_MAX.</title>
<updated>2019-10-17T21:54:28Z</updated>
<author>
<name>millert</name>
<email>millert@openbsd.org</email>
</author>
<published>2019-10-17T21:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=b4de0548946752b02f28ecae80da4996de54dba4'/>
<id>urn:sha1:b4de0548946752b02f28ecae80da4996de54dba4</id>
<content type='text'>
This is the userland portion.  OK deraadt@ sashan@
</content>
</entry>
<entry>
<title>When system calls indicate an error they return -1, not some arbitrary</title>
<updated>2019-06-28T13:32:41Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2019-06-28T13:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=df69c215c7c66baf660f3f65414fd34796c96152'/>
<id>urn:sha1:df69c215c7c66baf660f3f65414fd34796c96152</id>
<content type='text'>
value &lt; 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
</content>
</entry>
<entry>
<title>Fail on invalid netmasks when filling tables</title>
<updated>2019-03-30T02:45:14Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2019-03-30T02:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=dfaca1426d2f402b9ee550b3068aeefa65af14cf'/>
<id>urn:sha1:dfaca1426d2f402b9ee550b3068aeefa65af14cf</id>
<content type='text'>
Fix a regression of revision 1.326 "Zap v4mask and v6mask in host()" which
allowed CIDR networks with more than one "/" to be loaded into tables.

I took care of this code path with regard to rules coming the ruleset
parser, which aborts earlier on such invalid specifications, but missed
`-T add 1/2/3' and the like.

Analyzed and fixed by Petr Hoffmann &lt;petr dot hoffmann at oracle dot com&gt;,
thanks!

OK deraadt
</content>
</entry>
<entry>
<title>Reuse copy_satopfaddr() when killing entries</title>
<updated>2019-01-29T10:58:31Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2019-01-29T10:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=0ff82421d83962a6e348424fabb01a1e0860c3eb'/>
<id>urn:sha1:0ff82421d83962a6e348424fabb01a1e0860c3eb</id>
<content type='text'>
Recently introduced in pfctl_parser.c r1.333, this helper nicely
simplifies code when copying IPs based on their address family, so use
it in five other places when killing state or source node entries.

All addresses copied in these code paths result from either
pfctl_parse_host() or pfctl_addrprefix() which guarantee the address
family set to AF_INET or AF_INET6.  Therefore, effectively relaxing the
case of unhandled families from errx(3) in callers to warnx(3) in
copy_satopfaddr() is safe since it's never reached.

OK sashan
</content>
</entry>
<entry>
<title>The kernel does not set the address family for the socket addresses</title>
<updated>2018-09-16T19:36:33Z</updated>
<author>
<name>bluhm</name>
<email>bluhm@openbsd.org</email>
</author>
<published>2018-09-16T19:36:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=1fef2296ff1c5d648e1cad0e50e55cd49ac1c64e'/>
<id>urn:sha1:1fef2296ff1c5d648e1cad0e50e55cd49ac1c64e</id>
<content type='text'>
that are used for netmask, broadcast, and destination address.  In
pfctl(8) take the family of the interface address and write it to
the other addresses.  This fixes some bugs when copy_satopfaddr()
copied only part of IPv6 addresses.  Print a warning if the address
family is unknown.
OK kn@
</content>
</entry>
<entry>
<title>Avoid unneeded variable in gen_dynnode()</title>
<updated>2018-09-13T06:03:27Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2018-09-13T06:03:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=9e1cf8ac885836bd39346dc283a124eac2e82b8e'/>
<id>urn:sha1:9e1cf8ac885836bd39346dc283a124eac2e82b8e</id>
<content type='text'>
OK bluhm
</content>
</entry>
<entry>
<title>Fix netmask regression in get_dynnode()</title>
<updated>2018-09-11T10:42:10Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2018-09-11T10:42:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=50befbbe2e1ae60123c8eb42e5a7fbe3f20ab288'/>
<id>urn:sha1:50befbbe2e1ae60123c8eb42e5a7fbe3f20ab288</id>
<content type='text'>
I introduced this error with r1.330 while removing the af parameter from
unmask().

`pass inet from (lo0)/24' would result in `pass inet from (lo0)', sorry.
</content>
</entry>
<entry>
<title>Remove unused buffer from host()</title>
<updated>2018-09-11T09:02:27Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2018-09-11T09:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=e7f9714dfbc90c74477c2dd60a3bb57af38f9bde'/>
<id>urn:sha1:e7f9714dfbc90c74477c2dd60a3bb57af38f9bde</id>
<content type='text'>
Left-over from pre-host_ip() times. While here, use __func__.

OK henning benno
</content>
</entry>
<entry>
<title>Merge host_v{4,6}() into simpler host_ip()</title>
<updated>2018-09-10T20:53:53Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2018-09-10T20:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=1b6fdc2f2464962c6f3ffa25c8df848f1594c8ec'/>
<id>urn:sha1:1b6fdc2f2464962c6f3ffa25c8df848f1594c8ec</id>
<content type='text'>
Except for networks such as "10/8" host_ip() now handles addresses in an
AF-agnostic way with more duplicate code removed/merged.

OK sashan (as for earlier copy_satopfaddr() diff) henning
</content>
</entry>
</feed>
