Skip to content

ip_napt_enable_no defined in lwip/lwip_napt.h, but not there in precompiled lib #6421

Closed
espressif/esp32-arduino-lib-builder
#161
@sekarpdkt

Description

@sekarpdkt

Board

All ESP32 modules

Device Description

ESP-WROOM-32

Hardware Configuration

Issue with enabling NAPT

Version

v2.0.2

IDE Name

Arduino IDE

Operating System

UBUNTU

Flash frequency

40Mhz

PSRAM enabled

no

Upload speed

115200

Description

Looks like, even though in lwip/lwip_napt.h, function void ip_napt_enable_no(u8_t number, int enable); is defined, actual implementation is missing. So while compiling the code, getting undefined reference error

Sketch

I included following define directives and headers

#define CONFIG_LWIP_IP_FORWARD 1
#define CONFIG_LWIP_IPV4_NAPT 1
#define CONFIG_LWIP_L2_TO_L3_COPY 1
#define PROTO_TCP 6
#define PROTO_UDP 17

#include "lwipopts.h"
#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#include "lwip/ip4_addr.h"
#include "lwip/lwip_napt.h"
#include "lwip/ip4_napt.h"

Code that enables NAT

/**
 * Enable/Disable NAPT for a specified interface.
 *
 * @param netif number of the interface: 0 = STA, 1 = AP
 * @param enable non-zero to enable NAPT, or 0 to disable.
 */
ip_napt_enable_no(0, 1);
ip_napt_enable_no(1, 1);


### Debug Message

```plain
Getting following error:


undefined reference to `ip_napt_enable_no'


### Other Steps to Reproduce

_No response_

### I have checked existing issues, online documentation and the Troubleshooting Guide

- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions