File tree Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -1738,6 +1738,7 @@ xcolon
17381738xconnected
17391739xcount
17401740xcurlength
1741+ xcurrentorder
17411742xcurstart
17421743xdatalength
17431744xdatalengthbytes
@@ -1781,6 +1782,7 @@ xeventgroupwaitbits
17811782xexpected
17821783xexpectedmessagetype
17831784xexpiredstate
1785+ xextheadercount
17841786xfamily
17851787xfield
17861788xflags
Original file line number Diff line number Diff line change @@ -71,11 +71,12 @@ jobs:
7171 formatting :
7272 # Use only 18.04 since we want the uncrustify version to
7373 # be 0.66.1_f to ensure proper formatting.
74- runs-on : ubuntu-18.04
74+ runs-on : ubuntu-20.04
75+ container : ubuntu:18.04
7576 steps :
76- - uses : actions/checkout@v2
77+ - uses : actions/checkout@v3
7778 - name : Install Uncrustify
78- run : sudo apt-get install uncrustify
79+ run : apt-get update && apt-get install uncrustify
7980 - name : Run Uncrustify
8081 run : |
8182 uncrustify --version
Original file line number Diff line number Diff line change 88 Uncrustify :
99 name : Run_Uncrustify
1010 if : ${{ github.event.issue.pull_request && github.event.comment.body == '/bot run uncrustify' }}
11- runs-on : ubuntu-18.04
11+ runs-on : ubuntu-20.04
12+ container : ubuntu:18.04
1213 steps :
1314 - name : Dump GitHub context
1415 env :
@@ -29,17 +30,16 @@ jobs:
2930 run : |
3031 echo ${{ steps.upstreamrepo.outputs.RemoteRepo }}:${{ steps.upstreambranch.outputs.branchname }}
3132 - name : Checkout upstream repo
32- uses : actions/checkout@v2
33+ uses : actions/checkout@v3
3334 with :
3435 repository : ${{ steps.upstreamrepo.outputs.RemoteRepo }}
3536 ref : ${{ steps.upstreambranch.outputs.branchname }}
36- - name : Install Uncrustify
37- run : sudo apt-get install uncrustify
37+ - name : Install Uncrustify and Git
38+ run : apt-get update && apt-get install uncrustify git-all
3839 - name : Run Uncrustify
3940 run : |
4041 uncrustify --version
4142 find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} +
42- find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} +
4343 - name : Push changes to upstream repository
4444 run : |
4545 git config --global user.name 'GitHub Action'
Original file line number Diff line number Diff line change @@ -342,6 +342,7 @@ eFrameProcessingResult_t eHandleIPv6ExtensionHeaders( NetworkBufferDescriptor_t
342342 uint8_t ucCurrentHeader = pxIPPacket_IPv6 -> xIPHeader .ucNextHeader ;
343343 uint8_t ucNextHeader = 0U ;
344344 BaseType_t xNextOrder = 0 ;
345+ BaseType_t xExtHeaderCount = 0 ;
345346
346347 while ( ( uxIndex + 8U ) < uxMaxLength )
347348 {
@@ -379,9 +380,18 @@ eFrameProcessingResult_t eHandleIPv6ExtensionHeaders( NetworkBufferDescriptor_t
379380 ucNextHeader ,
380381 ( int ) xNextOrder ) );
381382
382- if ( xNextOrder <= xCurrentOrder )
383+ xExtHeaderCount += 1 ;
384+
385+ /*
386+ * IPv6 nodes must accept and attempt to process extension headers in
387+ * any order and occurring any number of times in the same packet,
388+ * except for the Hop-by-Hop Options header which is restricted to
389+ * appear immediately after an IPv6 header only. Outlined
390+ * by RFC 2460 section 4.1 Extension Header Order.
391+ */
392+ if ( ( xExtHeaderCount > 1 ) && ( xCurrentOrder == 1 ) ) /* ipIPv6_EXT_HEADER_HOP_BY_HOP */
383393 {
384- FreeRTOS_printf ( ( "Wrong order\n" ) );
394+ FreeRTOS_printf ( ( "Wrong order. Hop-by-Hop Options header restricted to appear immediately after an IPv6 header \n" ) );
385395 uxIndex = uxMaxLength ;
386396 break ;
387397 }
You can’t perform that action at this time.
0 commit comments