Skip to content

Compile error if define LWIP_USE_EXTERNAL_MBEDTLS 1 and build with PPP eanbled (IDFGH-12599) #13597

@AxelLin

Description

@AxelLin

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1.3-416-gd23b7a0361

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

It should pass compilation with LWIP_USE_EXTERNAL_MBEDTLS=1.

What is the actual behavior?

"#define LWIP_USE_EXTERNAL_MBEDTLS 1" with below config:
CONFIG_LWIP_PPP_SUPPORT=y
CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
CONFIG_LWIP_PPP_PAP_SUPPORT=y
CONFIG_LWIP_PPP_CHAP_SUPPORT=y
CONFIG_LWIP_PPP_MSCHAP_SUPPORT=y
CONFIG_LWIP_PPP_MPPE_SUPPORT=y

I got below error:

In file included from /home/axel/esp/esp-idf/components/lwip/lwip/src/include/netif/ppp/mppe.h:42,
                 from /home/axel/esp/esp-idf/components/lwip/lwip/src/include/netif/ppp/ppp.h:174,
                 from /home/axel/esp/esp-idf/components/lwip/lwip/src/include/netif/ppp/ppp_impl.h:53,
                 from /home/axel/esp/esp-idf/components/lwip/lwip/src/core/init.c:62:
/home/axel/esp/esp-idf/components/lwip/lwip/src/include/netif/ppp/pppcrypt.h:128:27: error: unknown type name 'mbedtls_arc4_context'
  128 | #define lwip_arc4_context mbedtls_arc4_context
      |                           ^~~~~~~~~~~~~~~~~~~~
/home/axel/esp/esp-idf/components/lwip/lwip/src/include/netif/ppp/mppe.h:155:9: note: in expansion of macro 'lwip_arc4_context'
  155 |         lwip_arc4_context arc4;
      |         ^~~~~~~~~~~~~~~~~

Set
CONFIG_LWIP_PPP_CHAP_SUPPORT=n
CONFIG_LWIP_PPP_MSCHAP_SUPPORT=n

I got below error:

In file included from /home/axel/esp/esp-idf/components/lwip/lwip/src/netif/ppp/magic.c:83:
/home/axel/esp/esp-idf/components/lwip/lwip/src/netif/ppp/magic.c: In function 'magic_churnrand':
/home/axel/esp/esp-idf/components/lwip/lwip/src/include/netif/ppp/pppcrypt.h:108:26: error: unknown type name 'mbedtls_md5_context'; did you mean 'lwip_md5_context'?
  108 | #define lwip_md5_context mbedtls_md5_context
      |                          ^~~~~~~~~~~~~~~~~~~

Steps to reproduce.

  1. In components/lwip/lwip/src/include/netif/ppp/ppp_opts.h
    #define LWIP_USE_EXTERNAL_MBEDTLS 1
  2. Set below config to enable PPP settings
    CONFIG_LWIP_PPP_SUPPORT=y
    CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
    CONFIG_LWIP_PPP_PAP_SUPPORT=y
    CONFIG_LWIP_PPP_CHAP_SUPPORT=y
    CONFIG_LWIP_PPP_MSCHAP_SUPPORT=y
    CONFIG_LWIP_PPP_MPPE_SUPPORT=y

Build or installation Logs.

No response

More Information.

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions