Claudio Jeker <cje...@diehard.n-r-g.com> wrote: > On Tue, Nov 22, 2022 at 09:25:08AM +0000, Stuart Henderson wrote: > > Need to query (and set $if, which might be used in route commands etc) I > > think. > > > > I would prefer if people took a step back from configuring interfaces by > MAC address. It feels like a overly specific hack is introduced for > a case that should be handled in a different way. > > Not all interfaces have MAC addresses. E.g. umb(4) would need a > different identifier (most probably the IMEI). Some interfaces inherit > the MAC address from an other interface (vlan, trunk). > > This requires the use of interface groups to 'rename' these interfaces > e.g. as 'green' and 'blue' or 'in' and 'out'. So that you can use these > handles in pf.conf and other commands (rad comes to mind). Not all > commands work with interface groups. route(8) is such an example but there > are more commands needing this.
The point of hostname.MAC is you'll be able to 1) set the address 2) set the group and then pf.conf will use the group But that's no different than doing this in a hostname.IF file! We've been encouraging people to use the group egress, as well as predefined groups since they were invented!. In this case, people will start to use those more, but not because it is a MAC, but because the IF name is unstable. They can establish a stable group name, if they know what interface-instance to assign a group to. But otherwise, using groups to identify the specific interface position is completely unrelated to setting the configuration on these interfaces in the first place. Claudio, you really should *SHOW* a working configuration using !, if you believe in it so much. And do it without a helper shell script, because where are you going to slap that, into /etc, come on. What I came up before had 3 lines of ! command that were 70-90 characters long, and each line had to to run ifconfig to COMPARE AT THE MAC, and then run ifconfig to set a configuration; another example did the MAC and then ran ifconfig multipel times but that single line wrapped the screen multiple times. It was a demo of how rough this problem is. So maybe, show how you do ! commands in such files, so that everyone can see it is ugly as sin and the wrong thing.