16 Commits

Author SHA1 Message Date
Franco Fichtner
02dc1ebd93 interfaces: prevent DHCP from installing nameservers when not allowed
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
2022-02-05 08:16:43 +01:00
Franco Fichtner
61720fe233 scripts: tabs vs. spaces 2022-01-11 11:22:03 +01:00
Franco Fichtner
6704426c19 interfaces: repair getenv() breakage in ea6b5bda52409 the right way #5367
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().
2021-11-29 10:57:40 +01:00
Franco Fichtner
b28fa22d69 interfaces: nameserver can use same file format as others #5367
Also decouple searchdomain write from nameserver write in dhclient-script
and clear files properly.
2021-11-28 13:52:52 +01:00
Franco Fichtner
c6c7e9854d interfaces: searchdomain can use same file format as others #5367
Other directory was slightly confusing, other name even more so.
2021-11-28 13:42:38 +01:00
Franco Fichtner
99a0f1a164 interfaces: move nameserver files to /tmp #5367 2021-11-28 13:37:41 +01:00
Franco Fichtner
cc0b1b3be9 interfaces: move searchdomain files to /tmp #5367 2021-11-28 13:25:37 +01:00
Franco Fichtner
49210b3da8 interfaces: rc.newwanip(v6) changes related to #5367
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
2021-11-27 13:54:06 +01:00
Ad Schellevis
57f0575dcc interfaces: newwanip, clear states when address changes. for https://github.com/opnsense/core/pull/4726 2021-03-02 15:55:46 +01:00
Franco Fichtner
90c0c395a5 interfaces: check for valid alias IP #3197
Suggested by: @tbandixen
2019-02-15 11:26:14 +01:00
Franco Fichtner
8e9ae38fdc Revert "interfaces: remove arp flush from dhclient-script #3197"
This reverts commit a1dbbb5ef132487c88b2b144ac67eeedb00a576c.
2019-02-15 11:22:07 +01:00
Franco Fichtner
b20f71b19e interfaces: our dhclient-script doesn't clobber resolv.conf #3197
The FreeBSD one does, but we have different code that is "safe"
for multiple DHCP connections.
2019-02-08 22:23:18 +01:00
Franco Fichtner
a1dbbb5ef1 interfaces: remove arp flush from dhclient-script #3197
PR: https://forum.opnsense.org/index.php?topic=11037.0
2019-02-08 22:21:54 +01:00
Franco Fichtner
cae5ec3f69 system: remove apinger, dpinger takes over 2018-11-10 23:42:17 +01:00
Franco Fichtner
19b832f6c8 interfaces: try to sync dhclient-script #2542 2018-08-08 18:15:32 +02:00
Franco Fichtner
00838b49ce src: move dhclient-script to proper location
".ext" came to be because dhclient-script from BSD is also under sbin/,
but since we always explicity use this one just move it to a neutral
location and point to it.
2018-05-06 14:32:06 +02:00