netconfig: Decouple netconfig from station obj. for MAC assignment
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Tim,
Quoted 11 lines · Tim Kourt
netconfig defines
netconfig_mac_address_func_ttype. This function pointier can be implemented by the callers to provide the netconfig’s DHCP clients with an updated MAC address when it is about to be used. This patch is decoupling netconfig from station object and foreseeing the randomization of the MAC addresses in the future.--- src/netconfig.c | 38 +++++++++++++++++++++++++++++--------- src/netconfig.h | 6 +++++- src/station.c | 11 ++++++++++- 3 files changed, 44 insertions(+), 11 deletions(-)
<snip>
src/netconfig.c struct netconfig { · line 53
Quoted 11 lines
src/netconfig.c +3
-0@@ -48,6 +48,9 @@ struct netconfig {struct l_dhcp_client *dhcp_client;struct l_queue *ifaddr_list;uint8_t rtm_protocol; + +netconfig_mac_address_func_t mac_address; +void *user_data;
So I don't think this is necessary. The mac address right now will be static for the duration of netconfig's lifetime. So providing the mac at configure time (and maybe teardown) is sufficient.
Regards,
-Denis