]> git.ozlabs.org Git - ppp.git/commit - pppd/pppd.h
pppd: Remove usage of incorrect constant MAXIFNAMELEN
authorPali Rohár <pali@kernel.org>
Sat, 31 Jul 2021 18:47:21 +0000 (20:47 +0200)
committerPali Rohár <pali@kernel.org>
Sat, 31 Jul 2021 18:47:21 +0000 (20:47 +0200)
commite4b85dae99f201d2b9f3c1d3c4492154ef76a2e8
tree7452996269e5b5d2e028c617565391fb58b5a11c
parent610a7bd76eb1f99f22317541b35001b1e24877ed
pppd: Remove usage of incorrect constant MAXIFNAMELEN

MAXIFNAMELEN is currently hardcoded to 32, but maximal size of interface
name on Linux is just 15 + nul-term byte. This limit is already provided by
IFNAMSIZ macro defined in net/if.h header file.

So replace MAXIFNAMELEN usage by IFNAMSIZ to not silently truncate
interface name.

Signed-off-by: Pali Rohár <pali@kernel.org>
pppd/main.c
pppd/options.c
pppd/pppd.h
pppd/sys-linux.c