summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 759370e7be7..3982c29bbdc 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.189 2021/11/10 20:24:22 bket Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.190 2021/11/17 18:00:24 bket Exp $ */
/*
* Synchronous PPP link level subroutines.
*
@@ -4561,6 +4561,23 @@ sppp_get_params(struct sppp *sp, struct ifreq *ifr)
free(spa, M_DEVBUF, sizeof(*spa));
break;
}
+ case SPPPIOGDNS:
+ {
+ struct sdnsreq *spd;
+
+ spd = malloc(sizeof(*spd), M_DEVBUF, M_WAITOK);
+
+ spd->cmd = cmd;
+ memcpy(spd->dns, sp->ipcp.dns, sizeof(spd->dns));
+
+ if (copyout(spd, (caddr_t)ifr->ifr_data, sizeof(*spd)) != 0) {
+ free(spd, M_DEVBUF, 0);
+ return EFAULT;
+ }
+
+ free(spd, M_DEVBUF, sizeof(*spd));
+ break;
+ }
default:
return EINVAL;
}