Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2221875

Summary: [iproute]not export functions about new_json_obj
Product: Red Hat Enterprise Linux 8 Reporter: ying xu <yinxu>
Component: iprouteAssignee: Hangbin Liu <haliu>
Status: CLOSED WONTFIX QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.9CC: jiji, network-qe
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-14 03:29:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ying xu 2023-07-11 06:54:15 UTC
Description of problem:
not export functions about new_json_obj

Version-Release number of selected component (if applicable):
iproute-6.2.0-2.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1.yum install -y kernel-kernel-networking-sctp-bugs-slab_out_of_bounds_inet_diag_msg_sctpladdrs_fill_bz1484351.noarch
2.cd /mnt/tests/kernel/networking/sctp/bugs/slab_out_of_bounds_inet_diag_msg_sctpladdrs_fill_bz1484351
3.yum install -y iproute-devel nmap-ncat lksctp-tools-devel libmnl-devel
4.gcc -o sctp_diag_leak sctp_diag_leak.c -lsctp -lpthread -lnetlink -lmnl

Actual results:
# gcc -o sctp_diag_leak sctp_diag_leak.c -lsctp -lpthread -lnetlink -lmnl
In file included from sctp_diag_leak.c:33:
sctp_diag_leak.c: In function ‘main’:
sctp_diag_leak.c:146:32: warning: passing argument 2 of ‘rtnl_dump_filter_nc’ from incompatible pointer type [-Wincompatible-pointer-types]
  146 |         rtnl_dump_filter(&rth, callback, NULL);
      |                                ^~~~~~~~
      |                                |
      |                                int (*)(const struct sockaddr_nl *, struct nlmsghdr *, void *)
/usr/include/libnetlink.h:161:39: note: expected ‘rtnl_filter_t’ {aka ‘int (*)(struct nlmsghdr *, void *)’} but argument is of type ‘int (*)(const struct sockaddr_nl *, struct nlmsghdr *, void *)’
  161 |                         rtnl_filter_t filter,
      |                         ~~~~~~~~~~~~~~^~~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/libnetlink.a(libnetlink.o): in function `rtnl_echo_talk':
(.text[.text.group]+0x1f78): undefined reference to `new_json_obj'
/usr/bin/ld: (.text[.text.group]+0x1f7f): undefined reference to `open_json_object'
/usr/bin/ld: (.text[.text.group]+0x1f94): undefined reference to `close_json_object'
/usr/bin/ld: (.text[.text.group]+0x1f99): undefined reference to `delete_json_obj'
collect2: error: ld returned 1 exit status


Expected results:
no error

Additional info:

Comment 1 Hangbin Liu 2023-07-14 03:29:30 UTC
Upstream maintainer said the libnetlink is for internal use only. We need to use libmnl instead.