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
Closed

Do we still need IFF_DOWN? #1838

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants