DragonFlyBSD/src 212e48cetc/rc.d wg

rc.d/wg: Match wg ifnames on wg_start

  Specifying wg_interfaces="wg0" in /etc/rc.conf causes:

    ifconfig: ioctl SIOCSIFNAME (set name): File exists

  The interface name matching in the wg script is not matching the
  'wg' interfaces thus trying to set a custom interface name.

  Apparently expr does not interpret '+' from regex:

    $ expr 'wg0' : 'wg[0-9]+$' && echo matched
    0

  Workaround it by using already working expr usage:
    $ expr 'wg0' : 'wg[0-9][0-9]*$' && echo matched
    3
    matched


    [2 lines not shown]
DeltaFile
+1-1etc/rc.d/wg
+1-11 files

DragonFlyBSD/src 2976deasys/net if.c route.c, sys/netinet in.c ip_output.c

sys: Minor fixes to some comments
DeltaFile
+2-2sys/netinet/in.c
+1-1sys/net/if.c
+1-1sys/net/route.c
+1-1sys/netinet/ip_output.c
+1-1sys/netinet6/in6.c
+6-65 files

DragonFlyBSD/src fe2ce7csys/net/wg if_wg.c

wg: Minor code cleanups
DeltaFile
+13-18sys/net/wg/if_wg.c
+13-181 files

DragonFlyBSD/src 7485684sys/net route.h if.h, sys/netinet in.c

Whitespace cleanups
DeltaFile
+24-24sys/net/route.h
+19-18sys/netinet/in.c
+14-12sys/net/if.h
+13-13sys/net/route.c
+12-10usr.sbin/vnconfig/vnconfig.c
+10-11sys/netinet6/in6_proto.c
+92-8817 files not shown
+152-15223 files

DragonFlyBSD/src cf3a56csys/net rtsock.c, sys/netinet if_ether.c

sys: Minor code cleanups

No functional changes.
DeltaFile
+6-4sys/net/rtsock.c
+2-4sys/netinet6/in6.c
+2-1sys/netinet/if_ether.c
+0-3sys/netinet6/in6_ifattach.c
+1-1sys/sys/taskqueue.h
+11-135 files

DragonFlyBSD/src cfb5793sbin/mount_cd9660 mount_cd9660.c

mount_cd9660(8): Simplify and clean up set_charset()

Simplify set_charset(), partly according to mount_ntfs(8).

Meanwhile, clean up the whitespace styles.
DeltaFile
+27-37sbin/mount_cd9660/mount_cd9660.c
+27-371 files

DragonFlyBSD/src 7764eb6sbin/mount_cd9660 mount_cd9660.c mount_cd9660.8, sys/vfs/isofs/cd9660 cd9660_vnops.c cd9660_vfsops.c

cd9660: Add support for mask,dirmask,uid,gid options

The updates to mount_cd9660(8) are basically taken from mount_msdos(8).

GitHub PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/23
See also:
- https://github.com/freebsd/freebsd-src/pull/982
- https://github.com/NetBSD/src/pull/29
DeltaFile
+101-4sbin/mount_cd9660/mount_cd9660.c
+51-6sbin/mount_cd9660/mount_cd9660.8
+21-4sys/vfs/isofs/cd9660/cd9660_vnops.c
+9-1sys/vfs/isofs/cd9660/cd9660_vfsops.c
+6-0sys/vfs/isofs/cd9660/cd9660_mount.h
+5-0sys/vfs/isofs/cd9660/iso.h
+193-156 files

DragonFlyBSD/dports b244564. UPDATING

Sync Mk with ports
DeltaFile
+0-48UPDATING
+0-481 files

DragonFlyBSD/src eec1804sys/net route.c

net: Improve rt_print() and rt_addrinfo_print() debug functions

- Update rt_print() to print the full interface name (if_xname) instead
  of the underlying device name (if_dname).
- Update rt_addrinfo_print() to print flags, ifp and ifa; similar to
  rt_print().
DeltaFile
+13-12sys/net/route.c
+13-121 files

DragonFlyBSD/src 4149e9dsys/net route.h route.c

net: Fix panic in the rt_addrinfo_print() debug function

The 'rti_addrs' member is a bitmask of RTA_* values, not a count value,
so the rt_addrinfo_print() debug function would just panic.

Use RTAX_MAX instead to fix this bug.  Meanwhile, add brief comments to
'rti_addrs' and 'rti_flags' members.
DeltaFile
+3-3sys/net/route.h
+1-1sys/net/route.c
+4-42 files

DragonFlyBSD/src ce0bf05sbin/umount umount.c umount.8

umount(8): Add -d option to detach vn(4) devices

The '-d' option tells umount(8) to detach the underlying vn(4) device if
the filesystem was mounted from it.  Note that vn(4) is a virtual disk
and can provides multiple filesystems, so the vn(4) detaching can only
succeed when all the filesystems are umounted.

For example:
$ vnconfig -c vn dfly.img
vn4
$ mount_msdos /dev/vn4s1 /mnt/dfly/boot
$ mount_ufs /dev/vn4s2a /mnt/dfly/root
$ umount -d /mnt/dfly/boot
umount: VNIOCDETACH: /dev/vn4: Device busy
umount: detach of /dev/vn4s1 failed
$ umount -d /mnt/dfly/root
(now vn4 is detached)

A similar option exists in Linux's and FreeBSD's umount(8).

    [3 lines not shown]
DeltaFile
+61-5sbin/umount/umount.c
+9-4sbin/umount/umount.8
+70-92 files

DragonFlyBSD/src c008937sys/net if.c

net: Clean up ifa_ifwithnet() and ifaof_ifpforaddr()

- Add the static inline function ifa_match_withmask() to deduplicate the
  address match code in both functions.
- Use NULL instead of 0 for pointers.
- Minor style cleanups.
DeltaFile
+35-35sys/net/if.c
+35-351 files

DragonFlyBSD/src 5f75fb6sys/net route.c

net: Improve rt_print() and rt_addrinfo_print() debug functions

- Update rt_print() to print the full interface name (if_xname) instead
  of the underlying device name (if_dname).
- Update rt_addrinfo_print() to print flags, ifp and ifa; similar to
  rt_print().
DeltaFile
+12-11sys/net/route.c
+12-111 files

DragonFlyBSD/src 1de656csys/net route.c

net: Clean up sockaddr_print() by removing duplicate switch()
DeltaFile
+32-39sys/net/route.c
+32-391 files

DragonFlyBSD/src 5e1a59dsys/net if.c, sys/netinet in.c

netinet: Improve the deletion of loopback route

When the target host address is still bound to another interface address
(e.g., an address on another interface added later), the loopback route
should be updated to point to that address instead of simply being
removed.

Given that our rtrequest1() only supports route addition and deletion,
but not route change, we have to first remove the original loopback
route and then re-add a route with the wanted interface address.

See also in_localip_more() and ifa_switch_loopback_route() in FreeBSD.
DeltaFile
+29-5sys/netinet/in.c
+3-0sys/net/if.c
+32-52 files

DragonFlyBSD/src 2b2893dsys/net route.h route.c

net: Fix panic in the rt_addrinfo_print() debug function

The 'rti_addrs' member is a bitmask of RTA_* values, not a count value,
so the rt_addrinfo_print() debug function would just panic.

Use RTAX_MAX instead to fix this bug.  Meanwhile, add brief comments to
'rti_addrs' and 'rti_flags' members.
DeltaFile
+3-3sys/net/route.h
+1-1sys/net/route.c
+4-42 files

DragonFlyBSD/src e255cd8sys/net route.c if.c

net: Integrate link_rtrequest() into rt_getifa()

When a route was inserted but had an invalid IFA (rt_ifa), the
link_rtrequest() would be called to fix it with a link-level gateway.

Move the link_rtrequest() logic into the pre-insertion rt_getifa() step,
and thus simplifies the IFA selection.  This will also help the
forthcoming mangement of loopback routes for interface addresses.

Obtained-from: FreeBSD
- https://reviews.freebsd.org/D20076
- https://github.com/freebsd/freebsd-src/commit/2ad7ed6e4a84448234e9aaef3c9fa884848f7387
DeltaFile
+49-5sys/net/route.c
+0-27sys/net/if.c
+49-322 files

DragonFlyBSD/src 951ecd7sys/net if.c if_var.h, sys/netinet in_rmx.c in.c

netinet: Auto add loopback routes to interface addresses

When adding an address to an interface, a loopback route will be created
to route the traffic targeting it through the lo0 interface.  The
loopback route will also be removed when the corresponding interface
address is deleted.

In principle, this can help simplify the network input and output paths
by avoiding special handling of local addresses.  That deserves some
further efforts.

Nonetheless, an immediate benefit goes to wg(4).  Now we can access
(e.g., ping) from localhost a wg(4) interface's IPv4 addresses.
Previously it was broken because wg(4) is a virtual device and doesn't
have/use ARP.  For Ethernet devices, the ether_output() function will
redirect the traffic targeting its own address to the loopback interface
by calling if_simloop().

Derived from FreeBSD; the major commits are:

    [10 lines not shown]
DeltaFile
+72-0sys/net/if.c
+16-11sys/netinet/in_rmx.c
+18-0sys/netinet/in.c
+3-0sys/net/if_var.h
+109-114 files

DragonFlyBSD/src 650ba6fsys/netinet in.c

netinet: Simplify the handling of INADDR_ANY in in_ifinit()

Just check the interface address whether is INADDR_ANY and ignore the
checks of netmask/dstaddr.
DeltaFile
+3-11sys/netinet/in.c
+3-111 files

DragonFlyBSD/src c13724dusr.bin/sockstat sockstat.c

sockstat(1): Fix and improve output formatting

The main issue with the old formatting was that the FD column was
limited to 2 characters, so there would be no space between FD and PROTO
columns.

Increase the FD column to 5 characters, and increase the PID column to
6 characters.  In addition, refactor the output formatting code to clean
up the mess.

While there, clean up the code a bit to save some type castings.
DeltaFile
+69-64usr.bin/sockstat/sockstat.c
+69-641 files

DragonFlyBSD/src c1359f7sys/vfs/procfs procfs_vnops.c

procfs(5): Add '/proc/self/exe' symlink support

* Add the /proc/self symlink that's the same as /proc/curproc.
* Add the /proc/<pid>/exe entry that's the same as /proc/<pid>/file.

The '/proc/self/exe' symlink has been already landed in NetBSD and
FreeBSD [0].  It could simplify some patches to ports that look for this
symlink.

[0] https://github.com/freebsd/freebsd-src/pull/976

GitHub PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/22
DeltaFile
+9-2sys/vfs/procfs/procfs_vnops.c
+9-21 files

DragonFlyBSD/src 3ff0de4share/man/man5 procfs.5

procfs(5): Update man page for the previous change
DeltaFile
+12-1share/man/man5/procfs.5
+12-11 files

DragonFlyBSD/src 887de9esys/vfs/fuse fuse_vnops.c

sys/vfs/fuse: Some mmap related fixes, issues with sshfs and FUSE_FORGET

* Only issue FUSE_FSYNC when there is a file-handle associated with
  the fuse_node.

* Be sure to flush the VM object on inactive before releasing the
  file handle (fixes issues with mmap()).

* Don't issue FUSE_FORGET for now, it seems to confuse sshfs so either
  I'm doing something wrong or ... don't know.
DeltaFile
+39-14sys/vfs/fuse/fuse_vnops.c
+39-141 files

DragonFlyBSD/src 1a8e5e4sys/vfs/fuse fuse_vnops.c fuse_node.c

sys/vfs/fuse: Fix a ton more stuff

* Remove all the fuse_dent code.  It is no longer needed.

* Remove signal mask wrappers.  tsleep() isn't passing PCATCH so
  signals are basically ignored.

* Add missing required FUSE_RELEASE operations (paired with CREATE/OPEN)

* Add missing required FUSE_FORGET operations (paired with LOOKUPs).
  "." and ".." are not recorded by userland and do not need to be
  forgotten (will confuse userland if they are).

* No reply is expected from FUSE_FORGET RPCs, add infrastructure to
  handle this case.

* Index fuse_node's by their inode number, which greatly improves
  hardlink handling.


    [13 lines not shown]
DeltaFile
+222-236sys/vfs/fuse/fuse_vnops.c
+34-162sys/vfs/fuse/fuse_node.c
+72-4sys/vfs/fuse/fuse_ipc.c
+15-22sys/vfs/fuse/fuse.h
+11-3sys/vfs/fuse/fuse_device.c
+4-1sys/vfs/fuse/fuse_vfsops.c
+358-4281 files not shown
+359-4297 files

DragonFlyBSD/src 5d0d0basys/vfs/fuse fuse_vnops.c fuse_node.c

sys/vfs/fuse: Fix a ton of stuff and get writes working

* Recode all the file I/O.  Use the buffer cache properly, create a
  backend for BIO strategy calls.  mmap() should work properly now.
  write() should also now work properly.

* For the moment issue vfinalize() when the opencount == 0 to force
  the DFly kernel to dispose of inactive vnodes once all references
  (including mmap references) are gone.

* Recode the filehandle (fh) tracking.   File handles are assigned
  in fuse_vop_open() and instead of being released in fuse_vop_close()
  (which completely blows up mmap() operations), we now release
  file handles in fuse_vop_inactive().

  Remove the fh side allocation.  The fh is now positively stored in
  the fuse_node.

* Properly zero data structures allocated via the objcache.

    [34 lines not shown]
DeltaFile
+712-157sys/vfs/fuse/fuse_vnops.c
+79-55sys/vfs/fuse/fuse_node.c
+0-115sys/vfs/fuse/fuse_file.c
+87-5sys/vfs/fuse/fuse_vfsops.c
+17-14sys/vfs/fuse/fuse.h
+5-8sys/vfs/fuse/fuse_io.c
+900-3542 files not shown
+902-3588 files

DragonFlyBSD/dports 8d21fa1www/rubygem-rails70 distinfo Makefile

Update www/rubygem-rails70 to version 7.0.8.1
DeltaFile
+3-3www/rubygem-rails70/distinfo
+1-2www/rubygem-rails70/Makefile
+4-52 files

DragonFlyBSD/dports 5850e5bwww/rubygem-rails71 distinfo Makefile

Update www/rubygem-rails71 to version 7.1.3.2
DeltaFile
+3-3www/rubygem-rails71/distinfo
+1-1www/rubygem-rails71/Makefile
+4-42 files

DragonFlyBSD/dports ee72a18textproc/rubygem-actiontext71 distinfo Makefile

Update textproc/rubygem-actiontext71 to version 7.1.3.2
DeltaFile
+3-3textproc/rubygem-actiontext71/distinfo
+1-1textproc/rubygem-actiontext71/Makefile
+4-42 files

DragonFlyBSD/dports 7d41b3bmail/rubygem-actionmailbox71 distinfo Makefile

Update mail/rubygem-actionmailbox71 to version 7.1.3.2
DeltaFile
+3-3mail/rubygem-actionmailbox71/distinfo
+1-1mail/rubygem-actionmailbox71/Makefile
+4-42 files

DragonFlyBSD/dports f4f1269textproc/rubygem-actiontext70 distinfo Makefile

Update textproc/rubygem-actiontext70 to version 7.0.8.1
DeltaFile
+3-3textproc/rubygem-actiontext70/distinfo
+1-1textproc/rubygem-actiontext70/Makefile
+4-42 files