summaryrefslogtreecommitdiffstats
path: root/netconfig
diff options
context:
space:
mode:
authorJakub Jankowski <shasta@toxcorp.com>2017-11-21 03:22:27 +0100
committerRobby Workman <rworkman@slackware.com>2017-11-21 00:07:59 -0600
commit5d8fad3dc13963fa19ca02913f8c4f12ab3321c1 (patch)
tree5266d2d3b89e707998594be20280bbaf894f72b0 /netconfig
parentde60d4bdd7e634320f3c9e1248d51bd5e947808e (diff)
downloadslacknetsetup-5d8fad3dc13963fa19ca02913f8c4f12ab3321c1.tar.xz
rc.inet1: Avoid de-/configuring ifaces with indexes >=MAXNICS
The code around MAXNICS currently only uses it to populate first $MAXNICS elements of IFNAME array, which is later used to match interface name to index used to access all other arrays. If you configure IPADDR[6], this code doesn't find a matching entry in IFNAME but doesn't do anything about it. This works by accident, because iteration variable "i" stays at "6" after exiting the loop. But when you configure IPADDR[7], it will still stay on "6", and will use ...[6] values to configure that interface, which is potentially damaging. Better safe than sorry: let's check for this overflow and do nothing, instead of potentially doing the wrong thing. Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'netconfig')
0 files changed, 0 insertions, 0 deletions