Merge ~rafaeldtinoco/ubuntu/+source/iproute2:lp1831775-cosmic-sru-iproute2 into ubuntu/+source/iproute2:ubuntu/cosmic-devel

Proposed by Rafael David Tinoco
Status: Superseded
Proposed branch: ~rafaeldtinoco/ubuntu/+source/iproute2:lp1831775-cosmic-sru-iproute2
Merge into: ubuntu/+source/iproute2:ubuntu/cosmic-devel
Diff against target: 161 lines (+139/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/series (+2/-0)
debian/patches/ss-review-ssfilter.patch (+129/-0)
Reviewer Review Type Date Requested Status
Canonical Server Core Reviewers Pending
Canonical Server Pending
Andreas Hasenack Pending
Review via email: mp+368408@code.launchpad.net

This proposal supersedes a proposal from 2019-06-05.

Description of the change

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal

Thanks, some comments inline, and below.

For SRUs, the merge target should always be ubuntu/<release>-devel.

Can you elaborate a bit more on the test case you added to the bug? Like, what to expect in the broken and in the good cases. Ideally it should be as simple as just copying and pasting something in the command line, but it's fine if it needs some setting up. For example, "create a connection from A to B, note the IPs used, and use the IPs in the following command."

I saw you added some test results further down in the bug, but for the SRU template, it's best if all that's needed to verify the bug is fixed is in the "opening salvo".

In "regression potential", you say " * ss interpreter (bison powered) could be broken". What does that mean? Why do you think it could be broken? These are questions the SRU team would probably ask. "ip" is used all over the place, and it's good to detail what are your thoughts on possible regressions.

review: Needs Fixing
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote : Posted in a previous version of this proposal

Hello Andreas,

I pushed the commit again fixing changelog and version for cosmic which I saw it was wrong. Now, after reading your comments..

"""
Thanks, some comments inline, and below.

For SRUs, the merge target should always be ubuntu/<release>-devel.
"""

Okay

"""
Can you elaborate a bit more on the test case you added to the bug? Like, what to expect in the broken and in the good cases. Ideally it should be as simple as just copying and pasting something in the command line, but it's fine if it needs some setting up. For example, "create a connection from A to B, note the IPs used, and use the IPs in the following command."
"""

Alright, will change bug description for a more clear way of reproducing the issue

"""
I saw you added some test results further down in the bug, but for the SRU template, it's best if all that's needed to verify the bug is fixed is in the "opening salvo".
"""

I see.

"""
In "regression potential", you say " * ss interpreter (bison powered) could be broken". What does that mean? Why do you think it could be broken? These are questions the SRU team would probably ask. "ip" is used all over the place, and it's good to detail what are your thoughts on possible regressions.
"""

I usually start with biggest risk and try to reduce the risk with other topics. So, in this case:

 * ss interpreter (bison powered) could be broken

Means that the biggest risk would be to have ss interpreter broken.

 * patch is based in an upstream fix and was tested

But the patch, that changes ss interpreter, is an upstream fix and has been tested.

 * would likely not jeopardize ip command (higher issues)

It would NOT affect "ip" command and its interpreter, the most important part of iproute2.

But , now that I re-wrote in other words, I see the need to change that and will revisit.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote : Posted in a previous version of this proposal

I re-pushed the patch, fixed the versioning for 4.18.0-1ubuntu2.18.10.1, to differentiate it from Disco and Eoan merge requests I'll send soon. I have also fixed the changelog description (it had signed-off altogether and missing initial spaces, etc).

I'm trying to change the MR to -devel (instead of -proposed).

Thanks!

6da6ddb... by Rafael David Tinoco

Add: debian/patches/ss-review-ssfilter.patch

Fixed issue with ss and ssfilter where ssfilter rejects single
expresions if enclosed are in braces (LP: #1831775)

Signed-off-by: Rafael David Tinoco <email address hidden>

227676a... by Rafael David Tinoco

updated changelog for 4.18.0-1ubuntu2.18.10.1

Signed-off-by: Rafael David Tinoco <email address hidden>

Unmerged commits

227676a... by Rafael David Tinoco

updated changelog for 4.18.0-1ubuntu2.18.10.1

Signed-off-by: Rafael David Tinoco <email address hidden>

6da6ddb... by Rafael David Tinoco

Add: debian/patches/ss-review-ssfilter.patch

Fixed issue with ss and ssfilter where ssfilter rejects single
expresions if enclosed are in braces (LP: #1831775)

Signed-off-by: Rafael David Tinoco <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 9673707..961c76e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1iproute2 (4.18.0-1ubuntu2.18.10.1) cosmic; urgency=medium
2
3 * d/p/ss-review-ssfilter.patch: fixed issue with ss and ssfilter
4 where ssfilter rejects single expresions if enclosed are in
5 braces (LP: #1831775)
6
7 -- Rafael David Tinoco <rafaeldtinoco@ubuntu.com> Wed, 05 Jun 2019 21:49:03 -0300
8
1iproute2 (4.18.0-1ubuntu2) cosmic; urgency=low9iproute2 (4.18.0-1ubuntu2) cosmic; urgency=low
210
3 * d/p/1006-ubuntu-iprule-fix-output.patch11 * d/p/1006-ubuntu-iprule-fix-output.patch
diff --git a/debian/patches/series b/debian/patches/series
index 5aa32c6..cd6393b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,5 @@
71002-ubuntu-poc-fan-driver-vxlan.patch71002-ubuntu-poc-fan-driver-vxlan.patch
81005-ubuntu-fix-testsuite-kenv.patch81005-ubuntu-fix-testsuite-kenv.patch
91006-ubuntu-iprule-fix-output.patch91006-ubuntu-iprule-fix-output.patch
10
11ss-review-ssfilter.patch
diff --git a/debian/patches/ss-review-ssfilter.patch b/debian/patches/ss-review-ssfilter.patch
10new file mode 10064412new file mode 100644
index 0000000..d11928d
--- /dev/null
+++ b/debian/patches/ss-review-ssfilter.patch
@@ -0,0 +1,129 @@
1Description: ss: Review ssfilter
2
3The original problem was ssfilter rejecting single expressions if
4enclosed in braces, such as:
5
6| sport = 22 or ( dport = 22 )
7
8This is fixed by allowing 'expr' to be an 'exprlist' enclosed in braces.
9The no longer required recursion in 'exprlist' being an 'exprlist'
10enclosed in braces is dropped.
11
12In addition to that, a few other things are changed:
13
14* Remove pointless 'null' prefix in 'appled' before 'exprlist'.
15* For simple equals matches, '=' operator was required for ports but not
16 allowed for hosts. Make this consistent by making '=' operator
17 optional in both cases.
18
19Reported-by: Samuel Mannehed <samuel@cendio.se>
20Fixes: b2038cc0b2403 ("ssfilter: Eliminate shift/reduce conflicts")
21Signed-off-by: Phil Sutter <phil@nwl.cc>
22Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
23
24Origin: https://github.com/shemminger/iproute2/commit/38d209ecf2ae
25Bug-Ubuntu: https://bugs.launchpad.net/bugs/1831775
26Last-Update: 2019-06-05
27---
28 misc/ssfilter.y | 36 +++++++++++++++++++++---------------
29 1 file changed, 21 insertions(+), 15 deletions(-)
30
31diff --git a/misc/ssfilter.y b/misc/ssfilter.y
32index 88d4229a..0413ddda 100644
33--- a/misc/ssfilter.y
34+++ b/misc/ssfilter.y
35@@ -42,24 +42,22 @@ static void yyerror(char *s)
36 %nonassoc '!'
37
38 %%
39-applet: null exprlist
40+applet: exprlist
41 {
42- *yy_ret = $2;
43- $$ = $2;
44+ *yy_ret = $1;
45+ $$ = $1;
46 }
47 | null
48 ;
49+
50 null: /* NOTHING */ { $$ = NULL; }
51 ;
52+
53 exprlist: expr
54 | '!' expr
55 {
56 $$ = alloc_node(SSF_NOT, $2);
57 }
58- | '(' exprlist ')'
59- {
60- $$ = $2;
61- }
62 | exprlist '|' expr
63 {
64 $$ = alloc_node(SSF_OR, $1);
65@@ -77,13 +75,21 @@ exprlist: expr
66 }
67 ;
68
69-expr: DCOND HOSTCOND
70+eq: '='
71+ | /* nothing */
72+ ;
73+
74+expr: '(' exprlist ')'
75+ {
76+ $$ = $2;
77+ }
78+ | DCOND eq HOSTCOND
79 {
80- $$ = alloc_node(SSF_DCOND, $2);
81+ $$ = alloc_node(SSF_DCOND, $3);
82 }
83- | SCOND HOSTCOND
84+ | SCOND eq HOSTCOND
85 {
86- $$ = alloc_node(SSF_SCOND, $2);
87+ $$ = alloc_node(SSF_SCOND, $3);
88 }
89 | DPORT GEQ HOSTCOND
90 {
91@@ -101,7 +107,7 @@ expr: DCOND HOSTCOND
92 {
93 $$ = alloc_node(SSF_NOT, alloc_node(SSF_D_GE, $3));
94 }
95- | DPORT '=' HOSTCOND
96+ | DPORT eq HOSTCOND
97 {
98 $$ = alloc_node(SSF_DCOND, $3);
99 }
100@@ -126,7 +132,7 @@ expr: DCOND HOSTCOND
101 {
102 $$ = alloc_node(SSF_NOT, alloc_node(SSF_S_GE, $3));
103 }
104- | SPORT '=' HOSTCOND
105+ | SPORT eq HOSTCOND
106 {
107 $$ = alloc_node(SSF_SCOND, $3);
108 }
109@@ -134,7 +140,7 @@ expr: DCOND HOSTCOND
110 {
111 $$ = alloc_node(SSF_NOT, alloc_node(SSF_SCOND, $3));
112 }
113- | DEVNAME '=' DEVCOND
114+ | DEVNAME eq DEVCOND
115 {
116 $$ = alloc_node(SSF_DEVCOND, $3);
117 }
118@@ -142,7 +148,7 @@ expr: DCOND HOSTCOND
119 {
120 $$ = alloc_node(SSF_NOT, alloc_node(SSF_DEVCOND, $3));
121 }
122- | FWMARK '=' MARKMASK
123+ | FWMARK eq MARKMASK
124 {
125 $$ = alloc_node(SSF_MARKMASK, $3);
126 }
127--
1282.20.1
129

Subscribers

People subscribed via source and target branches