mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-09 16:01:19 +01:00
No need to try loading ng_socket.ko, as NgMkSockNode() does that
for us now if necessary.
This commit is contained in:
parent
fbffcf6685
commit
b08b2814a1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56709
@ -43,7 +43,6 @@
|
||||
#define PROMPT "+ "
|
||||
#define MAX_ARGS 512
|
||||
#define WHITESPACE " \t\r\n\v\f"
|
||||
#define NG_SOCKET_KLD "ng_socket.ko"
|
||||
#define DUMP_BYTES_PER_LINE 16
|
||||
|
||||
/* Internal functions */
|
||||
@ -143,16 +142,8 @@ main(int ac, char *av[])
|
||||
av += optind;
|
||||
|
||||
/* Create a new socket node */
|
||||
if (NgMkSockNode(name, &csock, &dsock) < 0) {
|
||||
if (errno == EPROTONOSUPPORT) {
|
||||
if (kldload(NG_SOCKET_KLD) < 0)
|
||||
err(EX_OSERR, "can't load %s", NG_SOCKET_KLD);
|
||||
if (NgMkSockNode(name, &csock, &dsock) >= 0)
|
||||
goto gotNode;
|
||||
}
|
||||
if (NgMkSockNode(name, &csock, &dsock) < 0)
|
||||
err(EX_OSERR, "can't create node");
|
||||
}
|
||||
gotNode:
|
||||
|
||||
/* Do commands as requested */
|
||||
if (ac == 0) {
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/linker.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
Loading…
Reference in New Issue
Block a user