summaryrefslogtreecommitdiff
path: root/pppd/pppd.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2016-08-23 16:10:21 +1000
committerPaul Mackerras <paulus@samba.org>2016-08-23 16:10:21 +1000
commitbbcdc4366bbee6c3f4e1ddda31e4eec8c1b3ccc2 (patch)
treec8953650f2a3090fba41929ef8662f4879284e53 /pppd/pppd.h
parent733c00a6ce0244ba5003f4f71a014db8200a30fe (diff)
downloadppp-bbcdc4366bbee6c3f4e1ddda31e4eec8c1b3ccc2.tar.gz
pppd: allow use of arbitrary interface names
This is a modified version of a patch from openSUSE that enables PPP interfaces to be called arbitrary names, rather than simply pppX where X is the unit number. The modifications from the stock openSUSE patch are: - refresh patch on top of 018_ip-up_option.diff - fix a printf format-string vulnerability in pppd/main.c:set_ifunit() - clarify the pppd.8 manpage additions - patch pppstats/pppstats.c to query renamed interfaces without complaint Origin: SUSE Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458646 Forwarded: no Reviewed-by: Chris Boot <bootc@debian.org> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'pppd/pppd.h')
-rw-r--r--pppd/pppd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/pppd/pppd.h b/pppd/pppd.h
index 247fa15..1a1bf0b 100644
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -80,6 +80,16 @@
#define MAXARGS 1 /* max # args to a command */
#define MAXNAMELEN 256 /* max length of hostname or name for auth */
#define MAXSECRETLEN 256 /* max length of password or secret */
+#define MAXIFNAMELEN 32 /* max length of interface name; or use IFNAMSIZ, can we
+ always include net/if.h? */
+
+/*
+ * If PPP_DRV_NAME is not defined, use the default "ppp" as the device name.
+ * Where should PPP_DRV_NAME come from? Do we include it here?
+ */
+#if !defined(PPP_DRV_NAME)
+#define PPP_DRV_NAME "ppp"
+#endif /* !defined(PPP_DRV_NAME) */
/*
* Option descriptor structure.
@@ -318,6 +328,7 @@ extern bool tune_kernel; /* May alter kernel settings as necessary */
extern int connect_delay; /* Time to delay after connect script */
extern int max_data_rate; /* max bytes/sec through charshunt */
extern int req_unit; /* interface unit number to use */
+extern char req_ifname[MAXIFNAMELEN]; /* interface name to use */
extern bool multilink; /* enable multilink operation */
extern bool noendpoint; /* don't send or accept endpt. discrim. */
extern char *bundle_name; /* bundle name for multilink */