Skip to content

Commit

Permalink
Merge pull request #59 from samuelemusiani/fix-socklen
Browse files Browse the repository at this point in the history
fix: socklen_t initialization
  • Loading branch information
rd235 authored Dec 23, 2024
2 parents 1702682 + 4808963 commit 85eb7a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/vde_autolink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,10 +1155,8 @@ static int mgmtcommand(int fd)
static int newmgmtconn(int fd,struct pollfd *pfd,int nfds)
{
int new;
unsigned int len;
char buf[MAXCMD];
struct sockaddr addr;
new = accept(fd, &addr, &len);
new = accept(fd, NULL, NULL);
if(new < 0){
printlog(LOG_ERR,"mgmt accept %s",strerror(errno));
return nfds;
Expand Down
4 changes: 1 addition & 3 deletions src/vde_router/vde_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,10 +1349,8 @@ int config_readline (int fd, char *l)
static int newmgmtconn(int fd,struct pollfd *pfd,int nfds)
{
int new;
unsigned int len;
char buf[MAXCMD];
struct sockaddr addr;
new = accept(fd, &addr, &len);
new = accept(fd, NULL, NULL);
if(new < 0) {
fprintf(stderr, "mgmt accept %s",strerror(errno));
return nfds;
Expand Down
4 changes: 1 addition & 3 deletions src/wirefilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,10 +943,8 @@ static char prompt[]="\nVDEwf$ ";
static int newmgmtconn(int fd,struct pollfd *pfd,int nfds)
{
int new;
unsigned int len;
char buf[MAXCMD];
struct sockaddr addr;
new = accept(fd, &addr, &len);
new = accept(fd, NULL, NULL);
if(new < 0){
printlog(LOG_WARNING,"mgmt accept %s",strerror(errno));
return nfds;
Expand Down

0 comments on commit 85eb7a6

Please sign in to comment.