Set MAC env var to the address used for ARP

This commit is contained in:
Joseph C. Lehner 2024-07-11 12:28:25 +02:00
parent 9478aae5ce
commit a0406519d2

2
nmrp.c
View file

@ -671,7 +671,7 @@ int nmrp_do(struct nmrpd_args *args)
printf("Executing '%s' ... \n", args->tftpcmd);
setenv("IP", inet_ntoa(ipaddr), 1);
setenv("PORT", lltostr(args->port, 10), 1);
setenv("MAC", mac_to_str(rx.eh.ether_shost), 1);
setenv("MAC", mac_to_str(arp_mac), 1);
setenv("NETMASK", inet_ntoa(ipmask), 1);
//setenv("FILENAME", args->file_remote ? args->file_remote : "", 1);
setenv("INTERFACE", args->intf, 1);