Skip to content

Commit

Permalink
externals/vtun: Fix socket argument
Browse files Browse the repository at this point in the history
The argument specified when opening a socket for control
is unified to NET_SOCK_XXX.
  • Loading branch information
SPRESENSE committed Feb 22, 2023
1 parent a9ba14f commit 1d07e99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions externals/vtun/compat_nuttx.c
@@ -1,7 +1,7 @@
/****************************************************************************
* externals/vtun/compat_nuttx.c
*
* Copyright 2021 Sony Semiconductor Solutions Corporation
* Copyright 2021, 2022 Sony Semiconductor Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -48,6 +48,7 @@
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <nuttx/net/netconfig.h>

#include "vtun.h"
#include "lib.h"
Expand Down Expand Up @@ -90,7 +91,7 @@ int update_vtun_state(int enable)
int ret = 0;
uint8_t sock_type = 0;

sockfd = socket(PF_USRSOCK, SOCK_STREAM, 0);
sockfd = socket(NET_SOCK_FAMILY, NET_SOCK_TYPE, NET_SOCK_PROTOCOL);

if (sockfd < 0)
{
Expand Down

0 comments on commit 1d07e99

Please sign in to comment.