Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,7 @@ xcolon
xconnected
xcount
xcurlength
xcurrentorder
xcurstart
xdatalength
xdatalengthbytes
Expand Down Expand Up @@ -1765,6 +1766,7 @@ xeventgroupwaitbits
xexpected
xexpectedmessagetype
xexpiredstate
xextheadercount
xfamily
xfield
xflags
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ jobs:
formatting:
# Use only 18.04 since we want the uncrustify version to
# be 0.66.1_f to ensure proper formatting.
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
container: ubuntu:18.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Uncrustify
run: sudo apt-get install uncrustify
run: apt-get update && apt-get install uncrustify
- name: Run Uncrustify
run: |
uncrustify --version
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/uncrustify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
Uncrustify:
name: Run_Uncrustify
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/bot run uncrustify' }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
container: ubuntu:18.04
steps:
- name: Dump GitHub context
env:
Expand All @@ -29,17 +30,16 @@ jobs:
run: |
echo ${{ steps.upstreamrepo.outputs.RemoteRepo }}:${{ steps.upstreambranch.outputs.branchname }}
- name: Checkout upstream repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }}
ref: ${{ steps.upstreambranch.outputs.branchname }}
- name: Install Uncrustify
run: sudo apt-get install uncrustify
- name: Install Uncrustify and Git
run: apt-get update && apt-get install uncrustify git-all
- name: Run Uncrustify
run: |
uncrustify --version
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} +
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} +
- name: Push changes to upstream repository
run: |
git config --global user.name 'GitHub Action'
Expand Down
14 changes: 12 additions & 2 deletions source/FreeRTOS_IPv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ eFrameProcessingResult_t eHandleIPv6ExtensionHeaders( NetworkBufferDescriptor_t
uint8_t ucCurrentHeader = pxIPPacket_IPv6->xIPHeader.ucNextHeader;
uint8_t ucNextHeader = 0U;
BaseType_t xNextOrder = 0;
BaseType_t xExtHeaderCount = 0;

while( ( uxIndex + 8U ) < uxMaxLength )
{
Expand Down Expand Up @@ -379,9 +380,18 @@ eFrameProcessingResult_t eHandleIPv6ExtensionHeaders( NetworkBufferDescriptor_t
ucNextHeader,
( int ) xNextOrder ) );

if( xNextOrder <= xCurrentOrder )
xExtHeaderCount += 1;

/*
* IPv6 nodes must accept and attempt to process extension headers in
* any order and occurring any number of times in the same packet,
* except for the Hop-by-Hop Options header which is restricted to
* appear immediately after an IPv6 header only. Outlined
* by RFC 2460 section 4.1 Extension Header Order.
*/
if( ( xExtHeaderCount > 1 ) && ( xCurrentOrder == 1 ) ) /* ipIPv6_EXT_HEADER_HOP_BY_HOP */
{
FreeRTOS_printf( ( "Wrong order\n" ) );
FreeRTOS_printf( ( "Wrong order. Hop-by-Hop Options header restricted to appear immediately after an IPv6 header\n" ) );
uxIndex = uxMaxLength;
break;
}
Expand Down