DHCP: Delete redundant codes, enhance code security

tool inclusion
category: bugfix
bugzilla:https://gitee.com/openeuler/ub-dhcp/issues/IALX53
CVE: NA

----------------------------------------------------------------------

1.Delete redundant codes.
2.Add const to read-only data.
3.Check the return value of the get_addr function.
4.The log level is changed from log_fatal to log_error.

Signed-off-by: Ge Hu huge4@huawei.com
(cherry picked from commit c5af2b6246a998394874a35f1162daa0cb02c6ee)
This commit is contained in:
Ge Hu 2024-08-27 15:41:52 +08:00 committed by openeuler-sync-bot
parent 83001a2adb
commit c79d786f51
2 changed files with 7 additions and 1 deletions

Binary file not shown.

View File

@ -3,7 +3,7 @@
Name: ub-dhcp
Version: 1.0.0
Release: 5
Release: 7
Summary: Dynamic host configuration protocol software
#Please don't change the epoch on this package
Epoch: 12
@ -260,6 +260,12 @@ exit 0
%{_mandir}/man3/ub-omapi.3.gz
%changelog
* Thu Aug 15 2024 Ge Hu <huge4@huawei.com> - 12:1.0.0-7
- Security check and modification.
* Thu Aug 15 2024 Ge Hu <huge4@huawei.com> - 12:1.0.0-6
- Update to openeuler-sp4.
* Thu Jun 6 2024 Zhongyuan Zhou <zhouzhongyuan1@huawei.com> - 12:1.0.0-5
- Modify the dguid of network control packets.