Currently this doesn't work (yet), likely needs https://reviews.freebsd.org/D35848 so vlanproto can be set after the interface creation phase (now it's only possible to set proto there).
If `ifconfig XXXX vlanproto 802.1ad` sets the property, we do need this code to make sure we set these on QinQ parent vlan tags. As a workaround we could pass proto in legacy_interface_create() as well to make this (only) work on boot, but looking at the upstream fix, this might be something easy to pull in the near future.
for https://github.com/opnsense/core/issues/5893
o add basic workflow (start/stop/list)
o basic configd actions + implementation in capture.py script
o grid without actions to show current capture jobs
It's still debatable if ifctl is a tool to record data
for interfaces and act on it or if the latter part should
be handled by more authorative (interface) code.
Inspired by: https://github.com/opnsense/core/pull/5992
... a.k.a. rc.resolv_conf_generate. While here protect more
code with the IP change guard and clear the IP address if the
address lookup came up empty.
This is a partial revert of 797c1864194 which has good intentions but rc.newwanip(v6)
isn't equipped with being called a lot of times yet. We want to improve this for 23.1.
Purge the file on all known dynamic spots that run a deconfigure
of some sort. We probably need something for a forced reload as
well but for now let's see if this works in general.
The default listing had an issue bringing in both the dhcp6c
and the slaac files. Now act according to what we implemented
as a fallback approach for reading data files.
Since "nameserver.sh" was a working title for when we just wanted
to make sense of the nameserver registration mess going on this
no longer fully applies for good reasons.
Change the name to ifctl.sh for leaving syntax parsing in place
and leave the symlink in sbin/ directory. The same works nicely
for configctl.
Since we already kill routes in nameserver registrations we can
also take on the arp/pfctl magic moving the "router" file check
to its native utility.
It's debatable if we even need the pfctl or arp flush here.
To be continued...
This breaks the new feature in the interim since the router file
read is not yet supposed to read :slaac counterpart since the router
file is still read manually. Refactor to follow.
We do want to eventually lean on exclusive ifctl use in order to
be able to improve logic in ifctl or make adjustments really easy in
the future without missing a spot (e.g. adding scope to link-local
routers).
New script to be invoked by rtsold when Router Advertisements with
RDNSS / DNSSL information are received. Uses ifctl to create the
/tmp/$if_routerv6 file and creates the /tmp/$if_defaultgwv6 file
directly. Fixes the issue that these files don't get created when
the M and O flags in RAs are not set. Also, passes RDNSS / DNSSL
info from RAs to ifctl.
Ideally rc.newwanip should be as lightweight as possible, with 8c49c7bfdd in place normal execution doesn't take much time, but it likely doesn't make sense to hook gif|gre interfaces either when nothing has changed.
closes https://github.com/opnsense/core/issues/5624
We add this here to ensure consistency between the functionalities
of these interface helper files. Not all instances have been
converted, but they can be as time permits. Tested on IPv6.
While here settle on "prefix" for pdinfo as a thing since we
renamed it already anyway.
Not sure about nameserver.sh name and scope yet so try to
hide it under a link. We can always change the name later
although having .sh suffix helps us lint the script more easily.
Also now we can grep for "interfaces_vlan_configure" to see both
and "interfaces" is the actual prefix to be used from interfaces.inc.
Later we should try to avoid calling "_" prefix functions from code
not in interfaces.inc.
Routes only get added in system_resolvconf_generate() now where
the DNS override is properly checked. The nameservers are added
through the new script for convenience and removed from there as
well. As a bonus we still scrub the routes from the nameserver
file removal to avoid creating "state" about what was done elsewhere.
This is still subject to a lot of funky races for overlapping host
routes either by ISP, manual DNS, gateway monitors or static routes.
o wrap vlan set pcp in new function legacy_vlan_pcp()
o add legacy_vlan_remove_tag() to detach our vlan
o use legacy_vlan_remove_tag() + legacy_vlan_tag() to update vlan interfaces, in which case configuration remains as it was which would make future modifications which don't rely on "logical" names easier.
This was refactored previously and all the logic should live outside
dhclient-script but it seems it's only loosely handled over there.
For now put a check back in the old way and rework this later correctly
from the system.inc point of view: we do want to register nameserver
and searchdomain in the cache files, but should not add a route if
those are not required. It would be helpful to show them in the overview
regardless (as for DNS servers) but with a hint that they are not being
used.
PR: https://forum.opnsense.org/index.php?topic=26765.0
Moral of the story: don't try to call backend scripts to grab env
variables that you could easily read using the acual nameserver
script sort of like dhclient-script is doing it.
ALLOWOVERRIDE is silly as we guard against that in get_nameservers().
o Only operate the /var/db IP files via rc.newwanip(v6)
o Consistenly flush a cache IP on a triggered reload
o Remove IPv6 address removal workaround from https://redmine.pfsense.org/issues/2627
o Assume that IP is properly checked making $cacheip != $ip a valid assumption when $cacheip is empty
o Remove creation from dhclient script