Don't crash when the user feeds us nonesense in the form:
ifconfig IF ether WHATEVER -alias PR: 42544 Submitted by: Mike Makonnen <makonnen@pacbell.net>
This commit is contained in:
parent
99253b64fb
commit
b6fcb4fec3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104337
@ -965,9 +965,10 @@ void
|
|||||||
notealias(const char *addr, int param, int s, const struct afswtch *afp)
|
notealias(const char *addr, int param, int s, const struct afswtch *afp)
|
||||||
{
|
{
|
||||||
if (setaddr && doalias == 0 && param < 0)
|
if (setaddr && doalias == 0 && param < 0)
|
||||||
bcopy((caddr_t)rqtosa(af_addreq),
|
if (afp->af_addreq != NULL && afp->af_ridreq != NULL)
|
||||||
(caddr_t)rqtosa(af_ridreq),
|
bcopy((caddr_t)rqtosa(af_addreq),
|
||||||
rqtosa(af_addreq)->sa_len);
|
(caddr_t)rqtosa(af_ridreq),
|
||||||
|
rqtosa(af_addreq)->sa_len);
|
||||||
doalias = param;
|
doalias = param;
|
||||||
if (param < 0) {
|
if (param < 0) {
|
||||||
clearaddr = 1;
|
clearaddr = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user