Hello again tech@
I've included diffs of what I've got so far at the bottom
of this mail, but first a couple of questions:
- Using the full 510-character limits for username and
passphrase specified in the MBIM spec, kernel compilation
fails due to tripping the 2047-byte stack frame warning
when compiling the driver. That's the reason for the '100'
magic numbers that I put in there temporarily.
Any hints on the best way to handle this would be appreciated.
- I included the username/passphrase fields in the ifconfig
output, as it seems to me that APN settings are generally
made public so end-users can configure their own devices
If needed I'll take it out, or perhaps change it to display
'*set*' (or similar) if you think it should be hidden?
A couple of other points:
- Wireless providers where I am all seem to require a
username/password with the APN. So I'm unable to confirm
whether or not this breaks non-authenticated connections.
- I've been building my kernel using the documented
procedure, and have no problems there. I ran through a
base system build and that (eventually) completed OK too.
When compiling ifconfig(8), I've been doing 'make includes'
in /usr/src (after installing and booting my new kernel),
and using 'make ifconfig' and 'make install' in
/usr/src/sbin/ifconfig. Is this OK? or should I be doing
something else instead?
Thanks,
Lee.
Index: sbin/ifconfig/ifconfig.8
===
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.343
diff -u -p -u -p -r1.343 ifconfig.8
--- sbin/ifconfig/ifconfig.810 Nov 2019 09:10:44 - 1.343
+++ sbin/ifconfig/ifconfig.814 Jan 2020 11:56:06 -
@@ -1914,6 +1914,9 @@ Clear the virtual network identifier.
.Op Cm pin Ar pin
.Op Cm puk Ar puk Ar newpin
.Op Oo Fl Oc Ns Cm roaming
+.Op Oo Fl Oc Ns Cm umbuser Ar user
+.Op Oo Fl Oc Ns Cm umbpasswd Ar password
+.Op Oo Fl Oc Ns Cm umbauth Ar authmethod
.Ek
.nr nS 0
.Pp
@@ -1960,6 +1963,26 @@ to validate the request.
Enable data roaming.
.It Cm -roaming
Disable data roaming.
+.It Cm umbuser Ar user
+Set the authentication username.
+.It Cm -umbuser
+Clear the current username.
+.It Cm umbpasswd Ar password
+Set the authentication password.
+.It Cm -umbpasswd
+Clear the current password.
+.It Cm umbauth Ar authmethod
+Set the authentication method. Valid methods are:
+.Ar none ,
+.Ar pap ,
+.Ar chap ,
+.Ar mschap .
+Specifying an invalid method will cause a value of
+.Ar none
+to be used.
+.It Cm -umbauth
+Clear the authentication method. Equivalent to
+.Cm umbauth none .
.It Cm up
As soon as the interface is marked as "up", the
.Xr umb 4
Index: sbin/ifconfig/ifconfig.c
===
RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.417
diff -u -p -u -p -r1.417 ifconfig.c
--- sbin/ifconfig/ifconfig.c27 Dec 2019 14:34:46 - 1.417
+++ sbin/ifconfig/ifconfig.c14 Jan 2020 11:56:06 -
@@ -339,6 +339,9 @@ voidumb_chgpin(const char *, const char
void umb_puk(const char *, const char *);
void umb_pinop(int, int, const char *, const char *);
void umb_apn(const char *, int);
+void umb_user(const char *, int);
+void umb_passwd(const char *, int);
+void umb_authentication(const char *, int);
void umb_setclass(const char *, int);
void umb_roaming(const char *, int);
void utf16_to_char(uint16_t *, int, char *, size_t);
@@ -587,6 +590,12 @@ const struct cmd {
{ "puk",NEXTARG2, 0, NULL, umb_puk },
{ "apn",NEXTARG,0, umb_apn },
{ "-apn", -1, 0, umb_apn },
+ { "umbuser",NEXTARG,0, umb_user },
+ { "-umbuser", -1, 0, umb_user },
+ { "umbpasswd", NEXTARG,0, umb_passwd },
+ { "-umbpasswd", -1, 0, umb_passwd },
+ { "umbauth",NEXTARG,0, umb_authentication },
+ { "-umbauth", -1, 0, umb_authentication },
{ "class", NEXTARG0, 0, umb_setclass },
{ "-class", -1, 0, umb_setclass },
{ "roaming",1, 0, umb_roaming },
@@ -5628,6 +5637,7 @@ setifpriority(const char *id, int param)
const struct umb_valdescr umb_regstate[] = MBIM_REGSTATE_DESCRIPTIONS;
const struct umb_valdescr umb_dataclass[] = MBIM_DATACLASS_DESCRIPTIONS;
+const struct umb_valdescr umb_authprot[] = MBIM_AUTHPROT_DESCRIPTIONS;
const struct umb_valdescr umb_simstate[] = MBIM_SIMSTATE_DESCRIPTIONS;
const struct umb_valdescr umb_istate[] = UMB_INTERNAL_STATE_DESCRIPTIONS;
const struct umb_valdescr umb_pktstate[] = MBIM_PKTSRV_STATE_DESCRIPTIONS;
@@ -5665,6 +5675,9 @@ umb_status(void)
char iccid[UMB_ICCID_MAXLEN+1];
char