This document describes how to update the Arm Mbed OS LWIP stack. The Mbed OS LWIP stack is a copy of the LWIP master repository. Stack is located in `connectivity/lwipstack/lwip` directory.
When you add new releases or single commits from the LWIP master repository, you must fetch them using the Mbed OS LWIP fork repository. Use the repository to rename LWIP source files with the `lwip_` prefix to make them compatible with the Mbed OS build system.
* The LWIP master repository is part of the [LWIP project](https://savannah.nongnu.org/projects/lwip).
* The Mbed OS LWIP fork repository is part of [`ARMmbed`](https://github.com/ARMmbed/lwip).
## How to integrate a release from the LWIP master repository to the Mbed OS
You can integrate a new release using the following steps.
* Fetch the release to the Mbed OS LWIP fork.
* Prefix files in the Mbed OS LWIP fork with the `lwip_` prefix.
* Merge the release to the Mbed OS repository.
### Fetching the release to the Mbed OS LWIP fork and prefixing files
1. Clone the Mbed OS LWIP fork repository.
`git clone git@github.com:ARMmbed/lwip.git`
2. Go to the Mbed OS LWIP fork root directory, and add the LWIP master repository as remote.
10. Check if there are any new or colliding files.
If there are new c-files rename those with `lwip_` prefix and make a commit about changes to the prefixed branch. Also, check that LWIP stack header file names do not collide with headers under the Mbed OS directory tree. If there are collisions, rename the colliding LWIP headers with `lwip_` prefix.
If needed, rename files, and make a commit. Update the C-files to include any renamed header files.
`git mv <old filename> <new filename>`
`git commit`
11. Rename the local prefixed branch to the new version. (Do not change branch names on remotes.)