Commit Graph

1608 Commits

Author SHA1 Message Date
openharmony_ci
452b04a24f
!39 Generate c files and header files in libnl
Merge pull request !39 from jiachanglin/master
2022-04-21 03:40:43 +00:00
jiachanglin
b63c929f4a fix: Generate c files and header files in libnl
Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-04-08 02:19:07 +00:00
openharmony_ci
23fd8d29be
!36 modify license to LGPL
Merge pull request !36 from michael4096/master
2022-03-16 03:37:24 +00:00
YOUR_NAME
ab5b2f3363 feat:modify license to LGPL
fix: libnl codex bug
BREAKING CHANGE: extends key in config file is now used for extending other config files
style:modify libnl driver style
docs:NA
test:NA

Signed-off-by: YOUR_NAME <xusai4@huawei.com>
2022-03-16 02:51:29 +00:00
openharmony_ci
b4c015eddf
!34 Change the sequence of source files
Merge pull request !34 from jiachanglin/master
2022-03-15 06:31:39 +00:00
jiachanglin
6352559cc9 fix: Change the sequence of source files
Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-03-14 11:01:43 +00:00
openharmony_ci
9ece1edc69
!29 Add the libnl source file
Merge pull request !29 from jiachanglin/master
2022-03-07 09:22:39 +00:00
jiachanglin
d767ae7d3c Description: Add the libnl source file
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-03-07 06:26:22 +00:00
jiachanglin
52ecec8278 Description: Add the libnl source file
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-03-07 05:14:19 +00:00
jiachanglin
ea7cfb7631 Description: Add the libnl source file
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-03-07 02:35:15 +00:00
openharmony_ci
6addb38ece
!28 修改libnl编译,解决wpa运行时问题
Merge pull request !28 from michael4096/master
2022-03-04 06:07:02 +00:00
YOUR_NAME
a253136b47 Description:modify libnl compile
Feature or Bugfix:Feature
Binary Source: No

Signed-off-by: YOUR_NAME <xusai4@huawei.com>
2022-03-04 04:44:34 +00:00
YOUR_NAME
d660676060 Description:modify libnl compile
Feature or Bugfix:Feature
Binary Source: No

Signed-off-by: YOUR_NAME <xusai4@huawei.com>
2022-03-04 04:09:14 +00:00
openharmony_ci
7d622feb91
!27 Generate c files and header files in libnl
Merge pull request !27 from jiachanglin/master
2022-02-28 07:55:53 +00:00
jiachanglin
2ed60ab4be Description: Generate c files and header files in libnl
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-02-28 06:35:49 +00:00
jiachanglin
4221f5cac4 Description: Generate c files and header files in libnl
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-02-28 04:49:19 +00:00
openharmony_sig_ci
28f8bab89b
!18 Add the README.OpenSource file
Merge pull request !18 from jiachanglin/master
2022-01-21 07:12:26 +00:00
jiachanglin
060d2928e7 Description: Add the README.OpenSource file
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-21 07:06:50 +00:00
jiachanglin
1b2bb0c6b4 Description: Add the README.OpenSource file
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-21 07:03:24 +00:00
jiachanglin
ca62dd0811 Description: Add the README.OpenSource file
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-21 07:00:28 +00:00
openharmony_sig_ci
ccf418c481
!17 Add the OAT.xml file
Merge pull request !17 from jiachanglin/master
2022-01-20 12:40:18 +00:00
jiachanglin
3a08ed0f32 Description: Add the OAT.xml file
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-20 12:28:54 +00:00
openharmony_sig_ci
4c0fb7835c
!16 Modify the README link
Merge pull request !16 from jiachanglin/master
2022-01-17 02:17:08 +00:00
jiachanglin
318ed262dc Description:Modify the README
Feature or Bugfix:Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-17 01:58:30 +00:00
openharmony_sig_ci
d62d45ab2b
!15 Modify the README
Merge pull request !15 from jiachanglin/master
2022-01-15 06:38:51 +00:00
jiachanglin
d39aba3bbd Description:Modify the README
Feature or Bugfix:Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-15 03:38:48 +00:00
openharmony_sig_ci
ba3f55c485
!14 Modify the libnl
Merge pull request !14 from jiachanglin/master
2022-01-14 17:45:20 +00:00
jiachanglin
fa4e1986ee Description: Modify the libnl
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-14 11:40:36 +00:00
jiachanglin
e048c7b63b Description:Modify the libnl
Feature or Bugfix:Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-13 09:21:50 +00:00
jiachanglin
00a371a702 Description: Modify the libnl
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
2022-01-13 08:44:47 +00:00
Thomas Haller
7b167ef85f libnl-3.5.0 release 2019-09-01 16:19:02 +02:00
Thomas Haller
2c862a606b route/qdisc: merge branch 'd0u9/htb_64'
https://github.com/thom311/libnl/pull/205
2019-09-01 15:57:12 +02:00
Thomas Haller
03ee05d975 route/qdisc: adjust API for 64 bit rate/ceil support for htb class
- existing API/ABI must stay unchanged. We cannot change parameter
  types. Ad most we can add new variants that support 64 bit integers.

- rtnl_tc_calc_txtime64() and rtnl_tc_calc_bufsize64() are trivial.
  We should not blow up the public API of libnl for such a thing.
  If the users needs it, they can just reimplement it.

- getters should return an error code. Especially if the return type
  does not support encoding an error there.

- don't add separate rs_rate64/rs_ceil64 field. Instead, extend the
  "rs_rate" field of "struct rtnl_ratespec" to 64 bits. It's internal
  API.
2019-09-01 15:54:33 +02:00
d0u9
4cf69a1b7b Add 64bit rate/ceil support for htb class
Htb class has already supported 64bit rate and ceil settings for times.
Now, in this patch, we grant this ability to libnl library.
2019-09-01 14:44:42 +02:00
Thomas Haller
2154891180 route/xfrmi: merge branch 'ebirger/add-xfrmi-support'
Rebased original pull request #214 on master. One commit ("xfrmi: add
IFLA_XFRM_* definitions to if_link.h") was thereby dropped as it
is no longer necessary. Otherwise, the two remaining patches applied
cleanly. Then, add two more patches to the branch before merging.

https://github.com/thom311/libnl/pull/214
2019-09-01 14:40:08 +02:00
Thomas Haller
9af32928c1 route/trivial: sort entries in "libnl-route-3.sym" asciibetically 2019-09-01 14:38:59 +02:00
Thomas Haller
ff61de28d7 xfrmi: return error code from getters for XFRM links
Returning the value directly as uint32_t does not leave room for an error
code. E.g. we want to indicate to the caller whether the attribute is present
or not (-NLE_NOATTR). Currenlty, the code is quite unforgiving and will just
crash/assert against invalid arguments. In theory, we could also be more forgiving
and return a error code if the link argument is invalid.
2019-09-01 14:38:59 +02:00
Eyal Birger
d147019c4b xfrmi: introduce XFRM interfaces support
XFRM interfaces were introduced in kernel 4.19.
This commit adds link support for these interfaces.

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
2019-09-01 14:24:52 +02:00
Eyal Birger
4b9370c6c9 doc/route: fix example code comments
Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
2019-09-01 14:24:52 +02:00
Thomas Haller
f3d5c44d21 lib: fix error code from nfnl_exp_build_message()
Otherwise we return success but don't actually set the output
result. This can lead to a crash, in case of out-of-memory.

Found by Coverity.

https://bugzilla.redhat.com/show_bug.cgi?id=1606988
2019-08-27 14:58:35 +02:00
Thomas Haller
34708e2ef0 lib: accept %NULL arguments for nl_addr_cmp()
Just be more forgiving. Also, this avoids a coverity warning:

    Error: FORWARD_NULL (CWE-476): [#def1]
    libnl-3.4.0/lib/route/addr.c:502: var_compare_op: Comparing "a->a_peer" to null implies that "a->a_peer" might be null.
    libnl-3.4.0/lib/route/addr.c:513: var_deref_model: Passing null pointer "a->a_peer" to "nl_addr_cmp", which dereferences it.
    libnl-3.4.0/lib/addr.c:587:8: deref_parm: Directly dereferencing parameter "a".
    #  585|   int nl_addr_cmp(const struct nl_addr *a, const struct nl_addr *b)
    #  586|   {
    #  587|-> 	int d = a->a_family - b->a_family;
    #  588|
    #  589|   	if (d == 0) {

https://bugzilla.redhat.com/show_bug.cgi?id=1606988
2019-08-27 14:46:21 +02:00
Thomas Haller
194069516d idiag: workaround and add comment about idiagnl_send_simple() only handling 8 bit flags
Related: https://github.com/thom311/libnl/pull/222#issuecomment-521956236
2019-08-26 15:52:26 +02:00
Michael Forney
73c1d04796 Sync linux headers to 4.19.66
This fixes the build with musl libc.

Additionally, several changes were made to account for changes to the
headers:

- ip_mp_alg.h was removed, since it was removed in linux commit e06e7c61
  (v2.6.23), and the last use of those constants was removed in libnl
  commit 535e8316.
- Uses of TCF_META_ID_SK_ROUTE_CAPS were updated to
  __TCF_META_ID_SK_ROUTE_CAPS, since it was renamed in linux commit
  e20e6940 (v3.1).
- Uses of IF_CARRIER_DOWN and IF_CARRIER_UP were replaced with their
  values, 0 and 1, since they are not in linux/if.h (they appear to be
  libnl-specific, added in libnl commit 3540e44b).

https://github.com/thom311/libnl/pull/222
2019-08-26 15:27:32 +02:00
Thomas Haller
397d880a88 all: merge branch 'michaelforney/portability'
https://github.com/thom311/libnl/pull/221
2019-08-16 07:43:11 +02:00
Michael Forney
bca4ac5072 route: Remove stray ; at top-level 2019-08-16 07:42:03 +02:00
Michael Forney
24e5b315a5 all: Use __typeof__ instead of typeof
This allows libnl to be built with -std=c99, which prevents the compiler
from using non-reserved identifiers for extensions.
2019-08-16 07:42:03 +02:00
Michael Forney
849140d3fd lib: Don't omit second operand to ? operator 2019-08-16 07:42:03 +02:00
Michael Forney
f69755ae53 lib: Don't return expression in function returning void 2019-08-16 07:42:03 +02:00
Michael Forney
de72910e6b all: Avoid pointer arithmetic on void *
ISO C requires that the pointer operand to the binary + operator be to
a complete object type[0].

[0] http://port70.net/~nsz/c/c11/n1570.html#6.5.6p2
2019-08-16 07:42:03 +02:00
Michael Forney
1a88619b72 dbg: Use __func__ instead of __PRETTY_FUNCTION__
These behave the same, except when used at top-level. This can't happen
since the macro body is a statement.

__func__ is standardized since C99, while __PRETTY_FUNCTION__ is a
GNU extension.
2019-08-16 07:42:03 +02:00