FreeBSD Bugzilla – Attachment 253705 Details for
Bug 281361
ddclient: messages about unknown DHCP option keep cluttering the log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
dhclient: Ignore DCHP option 125 defined in RFC 3925
dhclient.patch (text/plain), 5.99 KB, created by
Jose Luis Duran
on 2024-09-20 22:50:04 UTC
(
hide
)
Description:
dhclient: Ignore DCHP option 125 defined in RFC 3925
Filename:
MIME Type:
Creator:
Jose Luis Duran
Created:
2024-09-20 22:50:04 UTC
Size:
5.99 KB
patch
obsolete
>diff --git sbin/dhclient/dhclient.c sbin/dhclient/dhclient.c >index 4a674cec5888..7cbd183e2622 100644 >--- sbin/dhclient/dhclient.c >+++ sbin/dhclient/dhclient.c >@@ -2641,6 +2641,7 @@ check_option(struct client_lease *l, int option) > case DHO_DHCP_USER_CLASS_ID: > case DHO_URL: > case DHO_SIP_SERVERS: >+ case DHO_V_I_VENDOR_SPECIFIC_INFO: > case DHO_END: > return (1); > case DHO_CLASSLESS_ROUTES: >diff --git sbin/dhclient/dhcp.h sbin/dhclient/dhcp.h >index 99b69613934f..3a65fa8cb972 100644 >--- sbin/dhclient/dhcp.h >+++ sbin/dhclient/dhcp.h >@@ -174,6 +174,7 @@ struct dhcp_packet { > #define DHO_DOMAIN_SEARCH 119 > #define DHO_SIP_SERVERS 120 > #define DHO_CLASSLESS_ROUTES 121 >+#define DHO_V_I_VENDOR_SPECIFIC_INFO 125 > #define DHO_END 255 > > /* DHCP message types. */ >diff --git tools/boot/install-boot.sh tools/boot/install-boot.sh >index 332756582137..c47e70c4ef5c 100755 >--- tools/boot/install-boot.sh >+++ tools/boot/install-boot.sh >@@ -101,37 +101,63 @@ make_esp_device() { > # Check if /EFI/BOOT/BOOTxx.EFI is the FreeBSD boot1.efi > # If it is, remove it to avoid leaving stale files around > efibootfile="${mntpt}/EFI/BOOT/${efibootname}.efi" >- if [ -f "${efibootfile}" ]; then >- isboot1=$(strings "${efibootfile}" | grep "FreeBSD EFI boot block") > >- if [ -n "${isboot1}" ] && [ "$kbfree" -lt "${loadersize}" ]; then >- echo "Only ${kbfree}KB space remaining: removing old FreeBSD boot1.efi file /EFI/BOOT/${efibootname}.efi" >- rm "${efibootfile}" >- rmdir "${mntpt}/EFI/BOOT" >- else >- echo "${kbfree}KB space remaining on ESP: renaming old boot1.efi file /EFI/BOOT/${efibootname}.efi /EFI/BOOT/${efibootname}-old.efi" >- mv "${efibootfile}" "${mntpt}/EFI/BOOT/${efibootname}-old.efi" >+ if cmp -s "${efibootfile}" "${file}"; then >+ echo "The current /EFI/BOOT/${efibootname}.efi has not changed." >+ else >+ if [ -f "${efibootfile}" ]; then >+ isboot1=$(strings "${efibootfile}" | grep "FreeBSD EFI boot block") >+ >+ if [ -n "${isboot1}" ] && [ "$kbfree" -lt "${loadersize}" ]; then >+ efibootfilesize=$(stat -f %z "${efibootfile}") >+ efibootfilesize=$((efibootfilesize / 1024)) >+ >+ # XXX Is there a chance we remove our only loader? >+ if [ "$((kbfree + efibootfilesize))" -lt "${loadersize}" ]; then >+ # This code is the same as in the block below... >+ # once this piece is explained, I'll clean up. >+ umount "${mntpt}" >+ rmdir "${mntpt}" >+ echo "Failed to update the EFI System Partition ${dev}" >+ echo "Insufficient space remaining for ${file}" >+ echo "Run e.g. \"mount -t msdosfs ${dev} /mnt\" to inspect it for files that can be removed." >+ die >+ else >+ echo "Only ${kbfree}KB space remaining: removing old FreeBSD boot1.efi file /EFI/BOOT/${efibootname}.efi" >+ rm "${efibootfile}" >+ rmdir "${mntpt}/EFI/BOOT" >+ fi >+ else >+ echo "${kbfree}KB space remaining on ESP: renaming old boot1.efi file /EFI/BOOT/${efibootname}.efi /EFI/BOOT/${efibootname}-old.efi" >+ mv "${efibootfile}" "${mntpt}/EFI/BOOT/${efibootname}-old.efi" >+ echo "Copying loader to /EFI/BOOT on ESP" >+ cp -p "${file}" "${efibootfile}" >+ fi > fi >- fi > >- if [ ! -f "${mntpt}/EFI/freebsd/loader.efi" ] && [ "$kbfree" -lt "$loadersize" ]; then >- umount "${mntpt}" >- rmdir "${mntpt}" >- echo "Failed to update the EFI System Partition ${dev}" >- echo "Insufficient space remaining for ${file}" >- echo "Run e.g \"mount -t msdosfs ${dev} /mnt\" to inspect it for files that can be removed." >- die >+ if [ ! -f "${mntpt}/EFI/freebsd/loader.efi" ] && [ "$kbfree" -lt "$loadersize" ]; then >+ umount "${mntpt}" >+ rmdir "${mntpt}" >+ echo "Failed to update the EFI System Partition ${dev}" >+ echo "Insufficient space remaining for ${file}" >+ echo "Run e.g \"mount -t msdosfs ${dev} /mnt\" to inspect it for files that can be removed." >+ die >+ fi > fi > > mkdir -p "${mntpt}/EFI/freebsd" > >- # Keep a copy of the existing loader.efi in case there's a problem with the new one >- if [ -f "${mntpt}/EFI/freebsd/loader.efi" ] && [ "$kbfree" -gt "$((loadersize * 2))" ]; then >- cp "${mntpt}/EFI/freebsd/loader.efi" "${mntpt}/EFI/freebsd/loader-old.efi" >- fi >+ if cmp -s "${mntpt}/EFI/freebsd/loader.efi" "${file}"; then >+ echo "The current /EFI/freebsd/loader.efi has not changed." >+ else >+ # Keep a copy of the existing loader.efi in case there's a problem with the new one >+ if [ -f "${mntpt}/EFI/freebsd/loader.efi" ] && [ "$kbfree" -gt "$((loadersize * 2))" ]; then >+ cp -p "${mntpt}/EFI/freebsd/loader.efi" "${mntpt}/EFI/freebsd/loader-old.efi" >+ fi > >- echo "Copying loader to /EFI/freebsd on ESP" >- cp "${file}" "${mntpt}/EFI/freebsd/loader.efi" >+ echo "Copying loader to /EFI/freebsd on ESP" >+ cp -p "${file}" "${mntpt}/EFI/freebsd/loader.efi" >+ fi > > if [ -n "${updatesystem}" ]; then > existingbootentryloaderfile=$(efibootmgr -v | grep "${mntpt}//EFI/freebsd/loader.efi") >@@ -159,11 +185,13 @@ make_esp_device() { > echo "Existing UEFI FreeBSD boot entry found: not creating a new one" > fi > else >- # Configure for booting from removable media >- if [ ! -d "${mntpt}/EFI/BOOT" ]; then >- mkdir -p "${mntpt}/EFI/BOOT" >- fi >- cp "${file}" "${mntpt}/EFI/BOOT/${efibootname}.efi" >+ # Configure for booting from removable media >+ if [ ! -d "${mntpt}/EFI/BOOT" ]; then >+ mkdir -p "${mntpt}/EFI/BOOT" >+ fi >+ if [ ! -f "${mntpt}/EFI/BOOT/${efibootname}.efi" ]; then >+ cp -p "${file}" "${mntpt}/EFI/BOOT/${efibootname}.efi" >+ fi > fi > > umount "${mntpt}"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281361
:
253705
|
253706