Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we still need IFF_DOWN? #1838

Closed
masayuki2009 opened this issue Sep 18, 2020 · 2 comments · Fixed by #6636 or #13842
Closed

Do we still need IFF_DOWN? #1838

masayuki2009 opened this issue Sep 18, 2020 · 2 comments · Fixed by #6636 or #13842

Comments

@masayuki2009
Copy link
Contributor

masayuki2009 commented Sep 18, 2020

I noticed that IFF_DOWN is used both in nuttx and in apps to control network interface.
In my understanding, IFF_UP is enough and IFF_DOWN is rather redundant.

So my question is that do we still need IFF_DOWN?

@xiaoxiang781216
Copy link
Contributor

xiaoxiang781216 commented Sep 19, 2020

Same question for me, should we remove one? or change the code from:

#define IFF_DOWN           (1 << 0) /* Interface is down */
#define IFF_UP             (1 << 1) /* Interface is up */

to:

#define IFF_DOWN           (0 << 1) /* Interface is down */
#define IFF_UP             (1 << 1) /* Interface is up */

@masayuki2009
Copy link
Contributor Author

Same question for me, should we remove one? or change the code from:

#define IFF_DOWN           (1 << 0) /* Interface is down */
#define IFF_UP             (1 << 1) /* Interface is up */

to:

#define IFF_DOWN           (0 << 1) /* Interface is down */
#define IFF_UP             (1 << 1) /* Interface is up */

@xiaoxiang781216

I think that the above change does not work.
So I think we should replace all IFF_DOWN related code both in nuttx and in apps with IFF_UP.

xiaoxiang781216 added a commit to xiaoxiang781216/incubator-nuttx that referenced this issue Oct 6, 2024
turn off interface by checking IFF_UP flag isn't set:
apache#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
xiaoxiang781216 added a commit to xiaoxiang781216/incubator-nuttx-apps that referenced this issue Oct 6, 2024
turn off interface by checking IFF_UP flag isn't set:
apache/nuttx#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
GUIDINGLI pushed a commit to apache/nuttx-apps that referenced this issue Oct 7, 2024
turn off interface by checking IFF_UP flag isn't set:
apache/nuttx#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
xiaoxiang781216 added a commit to xiaoxiang781216/incubator-nuttx that referenced this issue Oct 7, 2024
turn off interface by checking IFF_UP flag isn't set:
apache#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
GUIDINGLI pushed a commit that referenced this issue Oct 8, 2024
turn off interface by checking IFF_UP flag isn't set:
#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
jerpelea pushed a commit to jerpelea/nuttx-apps that referenced this issue Oct 9, 2024
turn off interface by checking IFF_UP flag isn't set:
apache/nuttx#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
xiaoxiang781216 added a commit to apache/nuttx-apps that referenced this issue Oct 9, 2024
turn off interface by checking IFF_UP flag isn't set:
apache/nuttx#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
jerpelea pushed a commit to jerpelea/nuttx that referenced this issue Oct 15, 2024
turn off interface by checking IFF_UP flag isn't set:
apache#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
xiaoxiang781216 added a commit that referenced this issue Oct 15, 2024
turn off interface by checking IFF_UP flag isn't set:
#1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants